Maximum Directory Size For Cfilecache

i’m using CFileCache to cache big html sections (see topic).

i don’t want to add a expiration time, because i don’t know how long this cached section is up to date.

I like to set a maximum directory size for cached data, like max 50MB and when this size is reached, the oldest cached data (or longest not used) should get deleted to give space for new cache files.

is there some component like this?

if not, i think about deriving from CFileCache and add this feature. is this a good idea? or any other suggestions?

That’ll be your way to go. I suggest you overwrite CFileCache.gc() in your class.