In English

Automatic Invalidation in Application-Level Caching Systems

Jonathan Nilsfors ; Viktor Holmqvist
Göteborg : Chalmers tekniska högskola, 2018. 69 s.
[Examensarbete på avancerad nivå]

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 management, 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. In this thesis we present Cachematic, a general purpose application-level caching system with an automatic cache management strategy. Cachematic provides a simple programming model, allowing developers to explicitly denote a function cacheable. The result of a cacheable function will transparently be cached without the developer having to worry about cache management. The core component of the system is a dependency graph containing relations between database entries and cached content. The dependency graph is constructed by having the system listen to queries executed in a database. When a select query is detected within the scope of a cacheable function, the query is parsed and used to derive the dependency graph. When inserts, updates and deletes are detected, the dependency graph is utilized to determine which cached entries are affected by the modification. To evaluate Cachematic, a reference implementation was developed in the python programming language. Our experiments showed that the deployment of Cachematic decreased response time for read requests, compared to a manual cache management strategy. We also found that, compared to the manual strategy, the cache hit rate was increased with a factor of around 1.64x. On the contrary, a significant increase in response time for write requests was observed from the experiments.

Nyckelord: computer science, web applications, caching, cache invalidation, cache management, application-level caching



Publikationen registrerades 2018-12-14. Den ändrades senast 2018-12-14

CPL ID: 256402

Detta är en tjänst från Chalmers bibliotek