Cachematic – Automatic Invalidation in Application-Level Caching Systems
Paper in proceedings, 2019
Caching is a common method for improving the performance of modern web applications. Due to the varying architecture of web applications, and the lack of a standardized approach to cache man- agement, ad-hoc solutions are common. These solutions tend to be hard to maintain as a code base grows, and are a common source of bugs. We present Cachematic, a general purpose application-level caching system with an automatic cache management strategy. Cachematic provides a simple programming model, allowing de- velopers to explicitly denote a function as cacheable. The result of a cacheable function will transparently be cached without the developer having to worry about cache management. We present algorithms that automatically handle cache management, handling the cache dependency tree, and cache invalidation. Our experiments showed that the deployment of Cachematic decreased response time for read requests, compared to a manual cache management strategy for a representative case study conducted in collaboration with Bison, an US-based business intelligence company. We also found that, compared to the manual strategy, the cache hit rate was increased with a factor of around 1.64x. However, we observe a sig- nificant increase in response time for write requests. We conclude that automatic cache management as implemented in Cachematic is attractive for read-domminant use cases, but the substantial write overhead in our current proof-of-concept implementation represents a challenge.