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

Kick cache for certain sites on Saving others

admin

Started by Hubi Schulze 8 years ago · 3 replies · 841 views
8 years ago

I made a one-pager theme which builds up parts from entries of sub-pages
In that case it's dogs:

  • So a Dog has 4 fields (name, short_text,long_text,images)
  • the short-text, name and the first image is used to show up on the home-page in something like a view
  • the long-text and all the images show up on a sub-page when you click on one of the entries in the home page
  • so the part of the home page showing those dog-entries is a modular with page.find('/dogs').children loop in the twig-template

my problem
When I update or add a dog (so a sub-page) I would like to kick the cache for the home-page so that it show the new entry as soon as it is saved. Otherwhise the editor has to kick the cash manually every time it adds a new dog to the system.

my question
Is there a way to tell a grav to selectively refresh the cache for a certain page when saving a certain other page-type?

8 years ago

Hi @paulhibbitts

That would probably work, but then my home page is not cached at all.

I want to update the cache of site A (modular page) when site B (some other regular sub-page) is added/saved/deleted.

35|296x500

8 years ago

Is it an option just to leave the Cache off? Otherwise I do not know myself how you might do what you are asking.

Suggested topics

Topic Participants Replies Views Activity
Support · by BenLaKnet, 6 days ago
1 124 2 days ago
Support · by BenLaKnet, 1 week ago
5 196 2 days ago
Support · by kskt, 3 days ago
0 47 3 days ago
Support · by David Meissner, 3 days ago
0 47 3 days ago
Support · by David Meissner, 4 days ago
3 93 3 days ago