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

Cache-control header by page

Started by Jordi Rivero 9 years ago · 7 replies · 2432 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 ian russell, 4 days ago
2 115 3 days ago
General · by pamtbaau, 1 month ago
2 376 1 week ago
General · by Hanns Mattes, 1 month ago
2 357 2 weeks ago
General · by Andy Miller, 1 month ago
0 260 1 month ago
General · by Jerry Hunt, 1 month ago
2 401 1 month ago