Programming: Caching
From wikinotes
Invalidation
Tag Caching
Objects are assigned an auto-incrementing version number
When an object changes, the cache is updated with that version number
Caches that refer to multiple object-types, keep a reference to the versions of each object the cache refers to.ex.
- User created
user_v=0
- User renamed
user_v=1
- ProjectUsers
adds user proj_v=1
- ProjUserCache is tagged with
user_v=1,proj_v=1