Setting a limit to cacheing files?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Huhu
Regular
Posts: 158
Joined: Tue Oct 04, 2011 3:22 pm

Setting a limit to cacheing files?

Post by Huhu »

Under template_c, I have masses of cached files (simple_cache) piling up -- almost 1 GB. Is there a way to limit the cache size, so that oldest files get deleted if a limit is reached?
Frontend: Timeline. Backend: 2k11.

Thanks!
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
onli
Regular
Posts: 2850
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Setting a limit to cacheing files?

Post by onli »

Hi!
I don't see an option for that in the cache_module we use. We already set a time to live when caching items, defaulting to 1 hour, and from the code of the module, outdated items should get removed when they are accessed again later. Either that is broken, or many cache items were never accessed twice?

In theory, we picked that cache library because it does not have to cache into template_c/. It could also use other backends, like Redis (though that is proprietary now), Memcache or Memcached. And those can have a maximum on their end.

But checking the code again now I see that we would probably need to change how we initialize the cache to activate that. Is that something that would be helpful to you?
Post Reply