Caching Partially Materialized Views Consistently

Cache and Materialized View According to the PostgreSQL wiki, A materialized view is a table that actually contains rows, but behaves like a view. That is, the data in the table changes when the data in the underlying tables changes. According to Wikipedia, ... a materialized view is a database object…

When and How to Invalidate Cache

You can leave comments on HN – https://news.ycombinator.com/item?id=31709501. In this post, I will talk about one way to figure out when to invalidate cache entries. I will use a specific setup as an example, which should still be general enough, and at the end of…

Cache Invalidation

Cache made consistent: Meta’s cache invalidation solutionWhen it comes to cache invalidation, we believe we now have an effective solution to bridge the gap between theory and practice.Engineering at MetaLu Pan [https://engineering.fb.com/2022/06/08/core-data/cache-invalidation/]We wrote a post on Meta/FB's engineering…

Compare Small Versions that Wrap Around

Why use small versions Almost all stateful services (data store, cache, etc.) have versions stored along with each piece of data. The version can be in the form of a timestamp, version (a.k.a logical clock), or even better -- Hybrid Logical Clock. If it's a data store, HLC…

Different ways of caching and maintaining cache consistency

Phil Karlton [http://www.meerkat.com/karlton/] once said, "There are only two hard things in Computer Science: cache invalidation and naming things.[1]" There are other good variations of the quote. Mine personal favorite is Jeff Atwood's quote [https://twitter.com/codinghorror/status/506010907021828096?lang=en], "There are two…