Replies: 2 comments 4 replies
-
I just came across this issue in a project, +1 for the suggestion to handle this natively. Would be great if Craft could handle this scenario, even though I'm not sure how this could be solved. Another related issue: What about creating new entries that would match an element query inside a cache tag? For example, let's say I have a calendar page that lists entries chronologically and I'm caching the entire entry list. Saving any entry in that list will invalidate the cache. But adding a new one that should be displayed in that list will not. Again, not sure if there is a good solution to this issue. Maybe keep track of the element query somehow and execute it after every save to see if the results changed? Though maybe that's too complicated. How are y'all handling those issues right now? Especially in scenarios with a lot of nested component templates, where the |
Beta Was this translation helpful? Give feedback.
-
This problem affects headless sites heavily. Because the GraphQL cache isn't invalidated when a scheduled post should appear, the post in question will never show up until something else in the CMS changes. |
Beta Was this translation helpful? Give feedback.
-
Wherever I'm using the cache tag, I find myself eventually having to use this solution, if a client tries to use future-dated entries: http://craftcms.stackexchange.com/questions/2610/how-can-i-cache-a-list-of-entries-with-pending-postdates-and-have-it-automatical
Seems like there should be a way to bake this into Craft's native cache invalidation routines so I didn't have to do the same thing on every template.
Beta Was this translation helpful? Give feedback.
All reactions