CachingWhy bother caching?
Every read walks to the archive.
Keep a copy closer.
Pattern 1In-Memory Cache = your desk
β‘ fastest
π private per instance
β can drift
Fast and simple, but every desk has its own version.
Pattern 2Shared Cache = the office shelf
π€ consistent
π scales out
πΆ one hop away
One shelf for the whole office.
Pattern 3Cache-Aside = the routine
Write? Update the DB, then throw the cached copy away.