Add "Invalidate Cache Tags" Feature To Content Channels

Add "Invalidate Cache Tags" Feature To Content Channels


This one may seem a little nerdy to some... but trust me, you want this, so please vote for it! First, for some context, see Jon's excellent RockU video on caching (you'll want to know that info even if you don't vote for this Idea):

Now that you know how important caching is, if you're like me, you're bemoaning the fact that with Content Channels in particular, you can't set the Item Cache as LONG as you'd like, because every time a new ITEM is added to the channel, it won't show up until the cache expires and the new item gets read from the database... think of a content channel on your Rock homepage that shows Staff News... you want it cached a long time for performance reasons, but you have to compromise and make the cache time something "reasonable" like 30 or 60min, so that new news items show up relatively quickly. But that also means every 30 or 60min, some poor soul takes a 3sec nap while the Rock homepage loads, even though NOTHING has changed on the content channel.

That's where this Idea comes in. Now imagine on a per-Content-Channel basis, you could (optionally) select one or more cache tags in its config, and any time a new item is added or existing item is edited, those cache tags get invalidated. On the Content Channel View block side of things, you just configure it to use the same cache tag(s).

This would have the effect of letting us cache Content Channels for a long time (say, 24hr) but the instant a new item is added/edited and saved, that cache would invalidate and on the next view of the channel, you'd get the new item (and re-cache it all).

This would also be a huge win for RSS feeds, which gained caching in v10, but currently do not have the ability to select specific cache tags, so that ability should be added, too (which makes sense since RSS feeds are sourced from Content Channels)

Photo of Jim Michael Submitted by Jim Michael, The Crossing  ·   ·  Core
Login to add a comment...