3 ms·
This is neat. There is one more case, where the cache is kept valid because the condition that makes it invalid is known. So, for example, if I have a message l
by makmanalp 13y ago
This is neat. There is one more case, where the cache is kept valid because the condition that makes it invalid is known. So, for example, if I have a message list page cached, I can simply invalidate the cache for that page when I add a new message for that specific user. Depending on the use case, I might want to even immediately repopulate that cache with the new info.
This is really the ideal scenario since things are always cached and requests don't even need to hit the dynamic site, but obviously this can't always happen since sometimes you just don't know.
- pjbringer 13y agoAlso, cache invalidation can actually be cache replacement. Otherwise, under very high load, you risk cache stampede.