Search code examples
phpperformancecachingkohana

What is Cache Tagging?


There is Cache_Tagging in Kohana but it does not explain what it is. Can anyone tell what Cache Tagging is supposed to do or when do we use it ?


Solution

  • Some cache implementations allow you to add one or more tags to any data item you store in the cache, and then find or delete all items with a given tag. This can be useful for a number of things, most significantly batch updates (you add a bunch of related stuff to the cache, tag it with a version string, and when you later learn that data from that version has become outdated, tell the cache to drop it all at once).