ets-berkeley-edu/calcentral — pull request #268 by ctweney (2012-11-16 22:20:54+00:00)
Title: NOJIRA Make our cache keys more namespacy

Cache key namespaces per Ray's suggestion, mutated a bit:

When subclasses of ApplicationController use caches_action, the cache key always gets automatically prefixed with "views/". So their keys look like:

views/user/904715/api/my/status

When we use Rails.cache directly in our model classes, I've designed it so those keys look like:

user/904715/UserApi/get_user_data

Or more generically:

thing/:thingid/ModelClass/method_to_be_cached

This should help in debugging since we can look at a cache key and know where to look to find the code that built its entry.