Caching

Pasted image 20230902110723.png

There are a few ways to update our cache:

Cache eviction

Cache staling

  • When no one used the cache and there is no eviction happens, cache can be stale.
  • To deal with it we can set a TTL and then try to expire the item
  • We can:
    • Passively expire an item — when an item got accessed it checks for TTL to expire
    • Actively expire item — have a thread to go through and query the expiration cache

Security

Caching strategies

Caching strategies