alphagov/govuk_content_api — pull request #134 by fatbusinessman (2013-12-09 15:27:18+00:00)
Title: Fix an infinitely-expanding Redis "cache"

We're currently using Redis as our cache store for the content API. The way our Redis instances are set up assumes that anything being stored as a cache item will have a TTL set; the way `redis-rack-cache` is set up assumes any Redis instances will treat all keys as disposable. These two assumptions combine to give us a "cache" that never expires, and so fills up indefinitely.

This is the quickest fix I could put together, but it's clearly fragile and liable to break with any subsequent versions of either the `redis-rack-cache` or `redis-store` gems.

We should fix this in a (far) better way after we’ve had some more time to think about it.