Closed nglasl closed 6 years ago
Hm, so we could segment the cache by stage? I.e. write on stage -> clears stage cache, write on live -> clears live cache. Sounds challenging but a good idea. :)
I was thinking something a little simpler, more so if the object is versioned, only clear the cache on after publish. I guess it depends on the benefits of caching staged content.
Ok, that might be simpler, as long as we disable caching in stage mode.
if the object is versioned, only clear the cache on after publish
You would probably also need to check that the class has a Live stage. You can use Versioned just to track changes by having a single stage, in which case there would not be a publish action.
Rather than purging the cache on after write for a data object, this should probably take versioning into account (or at least have a versioned specific extension available). When a content author is drafting something up and hitting save (on a page for example), you don't want to clear the entire cache.
Not only is this a problem when saving quite frequently, but it's also not necessary when caching is bypassed using the CMS preview to begin with.