Do you know what kind of cache entry that is? It might not even be an application cache entry, but a framework entry for rails query caching in active_record.

 

For a file cache, the directories are just for faster access. Most OSs are not happy with really large directories (linear search is typical), so file store caches will use some sort of hashing to spread the objects into small buckets, or even buckets of buckets. This is to say that those directory numbers are internal to the cache.

 

Ethan can correct this if it isn't quite right. In general, volatile cache data has a lifetime of the current request, and therefore in will be rebuilt on the next GET after the save. There are some less volatile cached items that you have to clear the cache for, and for some it is automatic.

 

An example is adding a new codename to the card database. We consider codename to id mapping (and the reverse) to be immutable so that it can just load once and stay loaded. There is likely some special behavior and/or caching around styles ('*all+*style in your example) and javascript (machine cards where we generate output files that can be permanently cached in the browser).

--Gerry Gleason.....2015-04-01 14:52:52 +0000

Shorter answer is we have a cache of individual card objects. We rarely rebuild the whole thing; usually a given card is cleared and rebuilt based on relevant actions. (eg card is edited).

 

We use the standard Rails caching mechanism. I'd have to look at code to figure out what the file/folders mean, but I'm about to go offline until Mon. April 7, so I'm afraid I can't dig into that today. Will look when I get back if Gerry doesn't beat me to it.

--Ethan McCutchen.....2015-04-01 18:51:36 +0000

D'oh, I'm confusing the psuedo-cache of in-memory cards. Internally we fetch them the same way, but what is call the local-cache is cleared each request.

--Gerry Gleason.....2015-04-01 19:24:30 +0000