I need simple caching mechanism behavior, but I canβt find a way to get it. I would be happy with caching on every site or in view mode, but I want some control over when to cache the cache.
For example, imagine that I have the simplest site - a blog. Until I send a new message, the main page will not change, so I am sure that the HTML code will be cached for several days, but I would like to say "update cache now" whenever I send a new message, so the first call My site after the new submission does not use cached HTML, but creates a new page that will be used until my next blog post.
How to do it? Thanks
EDIT
cache.clear() works well and as expected, but I need a more βspecificβ option where I can specify which view expires, and not the entire cache. thanks.
source share