Two ways a cached copy becomes invalid

Two ways a cached copy becomes invalid A workflow diagram generated by Archify. 01 / Source write 02 / TTL expiry 03 / Next read Change Invalidate Refresh on read Edit value · new version · Source write › Change Edit value new version Commit to source · authoritative copy · Source write › Change Commit to source authoritative copy Invalidate key · after the write · Source write › Invalidate Invalidate key after the write Cached copy · has a TTL · TTL expiry › Change Cached copy has a TTL TTL expires · entry no longer valid · TTL expiry › Invalidate TTL expires entry no longer valid Cache miss · key absent or expired · Next read › Refresh on read Cache miss key absent or expired Reload source · store a fresh copy · Next read › Refresh on read Reload source store a fresh copy time passes write entry expired key removed cache-aside read committed Legend Application Cache action Stored data