针对单表查询缓存结果的失效算法
Algorithm for Invalidation of Cached Results of Queries to a Single Table
AI总结:
针对高性能网站后端关系型数据库查询缓存失效不正确的问题,提出一种支持无限TTL和细粒度失效的算法,并在理论和实践中证明了其在并发环境下的正确性。
摘要:
高性能网站后端最流行的设置之一由关系型数据库和存储已执行查询结果的缓存组成。多个应用框架支持对数据库的查询缓存,但鲜少有框架能正确处理缓存失效,往往采用更简单的方案,如较短的TTL值,或在任何数据库写入后清空整个缓存。本文提出了一种简单、正确、高效且已在真实世界应用中测试过的解决方案,允许使用无限TTL,并实现极细粒度的缓存失效。该算法在并发环境下的正确性在理论和实践中均得到了证明。
英文摘要:
One of the most popular setups for a back-end of a high performance website consists of a relational database and a cache which stores results of performed queries. Several application frameworks support caching of queries made to the database, but few of them handle cache invalidation correctly, resorting to simpler solutions such as short TTL values, or flushing the whole cache after any write to the database. In this paper a simple, correct, efficient and tested in real world application solution is presented, which allows for infinite TTL, and very fine grained cache invalidation. Algorithm is proven to be correct in a concurrent environment, both theoretically and in practice.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。