Simon Willison’s Weblog

Subscribe
Atom feed for caching

46 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 / wordpresscom, caching, amazon-s3, s3, memcached, varnishd

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 / hash, sha1, douglas-crockford, html, caching

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 / caching, scaling, consistenthashing, hashing

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 / caching, scaling

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 / memcached, nginx, performance, caching, ilyagrigorik

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 / django, orm, david-cramer, caching, python, ormcaching

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 / django, performance, static, caching, orm, staticgenerator, jared-kuolt

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 / mark-nottingham, caching, http, cachechannels, atom, squid

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 / nginx, memcached, memcache, scaling, caching

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 / http, caching, mark-nottingham, squid

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 / caching, memcache, etags, michael-koziarski

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

Phil Karlton

# 5th July 2007, 12:46 am / caching, computer-science, naming-things, phil-karlton, tim-bray

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 / mark-nottingham, proxies, caching, http

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 / mintcache, caching, django, scaling, dogpile

2004

non-consensual http user tracking using caches. Interesting security issue involving HTTP caching headers

# 20th January 2004, 10:37 pm / security, caching, privacy

2002

Funky caching explained

I didn’t take much notice of “funky caching” while reading through Rasmus Lerdorf’s PHP tips and tricks presentation—I saw that it was talking about using custom 404 pages to serve up dynamic content depending on the URL and wrote it off as a hack that, while useful, was fundamentally flawed in that it would add an error log entry whenever a page was served.

[... 208 words]