General design, Application needs handle cache fill and cache miss logical and DB may expire/fill cache in some system[1].
Cache in DB
We can let DB handle the cache logic. for example Noria[2], it's a DBMS and can handle cache relate things through data flow in eventual consistency.
Some benchmarks[3]:
Cache in App Server
Put cache in app servers for avoiding (un)marshalling and network hops[4]. Such as Erlang ETS, Mnesia and [5].
References
Rajesh Nishtala. Scaling Memcache at Facebook, nsdi, 2013
Jon Gjengset, Partial State in Dataflow-Based Materialized Views, PhD dissertation, 2021
Where Can We Place the Cache?
General Design
General design, Application needs handle cache fill and cache miss logical and DB may expire/fill cache in some system[1].
Cache in DB
We can let DB handle the cache logic. for example Noria[2], it's a DBMS and can handle cache relate things through data flow in eventual consistency. Some benchmarks[3]:
Cache in App Server
Put cache in app servers for avoiding (un)marshalling and network hops[4]. Such as Erlang ETS, Mnesia and [5].
References