Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Caching Issue with blog listing

Started by Claud Rusnac 8 years ago · 7 replies · 891 views
8 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
8 years ago

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

8 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.

8 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?

8 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?

8 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?

8 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.

8 years ago

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

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 60 16 hours ago
Support · by Anna, 3 days ago
2 66 19 hours ago
Support · by Justin Young, 20 hours ago
1 34 20 hours ago
Support · by Duc , 1 week ago
2 70 6 days ago
Support · by Colin Hume, 1 week ago
2 61 6 days ago