Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Caching Issue with blog listing

Started by Claud Rusnac 9 years ago · 7 replies · 1192 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 complanar, 6 days ago
6 139 14 hours ago
Support · by Rick Beebe, 6 days ago
2 100 2 days ago
Support · by blu3prince, 3 days ago
0 50 3 days ago
Support · by alex, 4 days ago
2 92 3 days ago
Support · by Marcel, 2 weeks ago
1 143 4 days ago