3 ms·
You can do even better than that with something read-mostly like Wikipedia. Have a bunch of caches (or a cache hierarchy) which request pages on first use and
by zrm 9y ago
You can do even better than that with something read-mostly like Wikipedia.
Have a bunch of caches (or a cache hierarchy) which request pages on first use and then cache them indefinitely. Then when a page actually changes, you push notify all the caches to immediately evict that page.
- mpartel 9y agoSounds error-prone if the notification ever fails to reach some subset of the caches. A long expiration time (e.g. several hours) is probably almost as good, but also "self-healing".
- zrm 9y agoGiving out the wrong page for several hours is obviously better than giving out the wrong page forever, but it's still broken. Better would be to re-request the page after several hours and compare it to the cached copy. Then if they're different, update the cache, but also generate an alert to notify the administrator that something "impossible" happened and there is a bug somewhere that needs to be fixed.