Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Caching Issue with blog listing

Started by Claud Rusnac 9 years ago · 7 replies · 1249 views
9 years ago

I am having a challenge with a portion of my site and the caching configuration. The site is cached, but I am having challenges disabling the cache when I list pages while in a blog format. I put in the following entry blog page, but it's still caching:

YAML
cache:
    enabled: false
never_cache_twig: true

cache_control: false
9 years ago

Hi @crusnac, perhaps try this on your blog parent page?
cache_enable: false

9 years ago

Do you know if there is an option to exclude caching for anytime I pass a URL ?=parameter? This would achieve my need.

9 years ago

There might be, but I am not aware of it. Perhaps a small custom plugin could do this?

Might this post be helpful? /forum/support/performance-completely-disable-twig-caching-vs-disbling-cache-on-modulars-t9242

Anyone else here have thoughts on this one?

9 years ago

I tried this /forum/support/performance-completely-disable-twig-caching-vs-disbling-cache-on-modulars-t9242, but no luck.

I wonder if there is some twig code, that I can disable caching if a parameter is passed?

9 years ago

What exactly are you trying to do via a Twig clear cache? Do you get what you are looking for with the cache turned off in the system.yaml file?

9 years ago

I figured out my issue. I was including a template in my content {% include 'partials/subpages.html.twig' %} which was being cached as part of the content. I added some logic to the main page template to include a template based on a front-matter setting. This is now following the caching logic that I was expecting.

9 years ago

That's great @crusnac, glad you got it working.

Suggested topics

Topic Participants Replies Views Activity
Support · by webmasterodp, 7 days ago
4 151 6 days ago
Support · by nwhitfield, 1 week ago
2 131 1 week ago
Support · by stell, 3 weeks ago
5 364 2 weeks ago
Support · by gravinator, 1 month ago
5 556 2 weeks ago
Support · by Gravver, 3 weeks ago
6 344 3 weeks ago