什么是缓存标记? [英] What is Cache Tagging?
问题描述
在Kohana中有 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 ?
推荐答案
某些缓存实现允许您向存储在缓存中的任何数据项添加一个或多个标签,然后查找或删除具有给定标签的所有项.这对许多事情很有用,最重要的是批处理更新(您向缓存中添加了一堆相关的东西,用版本字符串标记它,然后当您得知该版本中的数据已过时时,请告诉缓存一次全部删除).
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 outdate, tell the cache to drop it all at once).
这篇关于什么是缓存标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!