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.

General

Cache-control header by page

Started by Jordi Rivero 9 years ago · 7 replies · 2280 views
9 years ago

Is possible configure the cache-control header by page?

9 years ago

@rhuk what about this?

https://learn.getgrav.org/content/headers#cache-enable

Cache Enable

cache_enable: false
By default, Grav will cache the contents of the page file to ensure things run as fast as possible. There are advanced scenarios where you do not want the page to be cached.

An example of this is when you are using dynamic Twig variables in your content. The cache_enable variable allows this behavior to be overridden. We will cover Twig Content variables in a later chapter. Valid values are true or false.

9 years ago

I think @jrivero is referring to HTTP headers :upside_down_face:

9 years ago

May be :) But I was looking for a way to disable cache on a single page myself today, so I'm sharing what I've found :)

👍 1
9 years ago

Yes, my understanding was he was looking for the cache-control header option to be set by page. That option is an internal grav cache enable/disable by page.

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 82 12 hours ago
General · by pamtbaau, 17 hours ago
1 55 16 hours ago
General · by Andy Miller, 1 day ago
0 45 1 day ago
General · by Marcel, 12 months ago
6 348 5 days ago
General · by Duc , 5 days ago
3 43 5 days ago