Simon Willison’s Weblog

Subscribe

45 items tagged “caching”

2008

so-you-wanna-see-an-image (via) WordPress.com use Amazon S3 to store images (presumably to save having to create a massive scalable redundant filesystem themselves) but the images are served via a load balanced memcached / varnishd caching system that they control. # 1st May 2008, 10:13 am

hash. Douglas Crockford: “Any HTML tag that accepts a src= or href= attribute should also be allowed to take a hash= attribute”—to protect against file tampering and (more importantly) provide a truly robust caching mechanism. # 30th March 2008, 6:34 pm

Consistent Hashing. Beautifully clear explanation of consistent hashing, a simple technique that allows you to add new caching servers to a cluster without re-hashing your keys and hence invalidating all of your caches. # 18th March 2008, 1 am

Two data streams for a happy website. Useful architectural concept for scaling: keep user-specific and generic data separate from the start, in recognition of their different caching and partitioning constraints. # 4th March 2008, 4:40 am

Nginx and Memcached, a 400% boost! Ilya Grigorik wrote up my current favourite nginx trick—you set nginx to check memcached for a cache entry matching the current URL on every hit, then invalidate your cache by pushing a new cache record straight in to memcached from your application server. # 11th February 2008, 10:05 pm

Caching Layer for Django ORM. Interesting extension to Django’s ORM that adds automatic caching of querysets and smart cache invalidation. # 23rd January 2008, 3:18 pm

Announcing StaticGenerator for Django. Simple but powerful static file generator for Django applications—just tell it about your model instances and it will create an entire static site based on calling get_absolute_url() on each one. Uses signals to repopulate the cache when a model changes. # 7th January 2008, 9:26 pm

HTTP Cache Channels (via) Interesting extension to the HTTP caching model by Mark Nottingham: caches can be told to subscribe to an Atom feed which alerts them to cached data that has gone stale. Group invalidation is also supported. # 4th January 2008, 12:48 pm

2007

NginxMemcachedModule. nginx can be set up to directly serve a URL from memcache if the corresponding cache key is set, and fall back to a backend application server otherwise. Application servers can then write directly to memcache when content needs to be cached or goes stale. # 15th December 2007, 1:59 am

Two HTTP Caching Extensions. stale-while-revalidate serves cached content even while a refresh has been triggered and is currently being pulled in to the cache; stale-if-error serves cached content if a service has gone down. # 12th December 2007, 11:23 am

Clever Caching. Instead of invalidating your cache directly, bump a version number on your model (blog entry or whatever) and use that as part of the cache key. This also gives you dynamic etags for free. # 5th July 2007, 12:56 am

There are only two hard things in Computer Science: cache invalidation and naming things

Phil Karlton # 5th July 2007, 12:46 am

The State of Proxy Caching. If you’ve always wondered exactly what intermediate proxies are going to do to your carefully constructed Web application, here’s your answer. # 21st June 2007, 2:18 pm

MintCache for Django. Caching scheme for Django that solves the dog-pile effect, where high traffic causes many processes to regenerate stale cached data at the same time. # 2nd May 2007, 8:49 am

2004

non-consensual http user tracking using caches. Interesting security issue involving HTTP caching headers # 20th January 2004, 10:37 pm