caching categories

Ah, sorry about not expressing myself more clearly. Yes, I was talking about the code should be in a separate .js file, not the cache file itself.