Use an eviction policy and specify maxNodes.
Eviction policy as i got defines which nodes should be removed from memory to secondary datastore (file, database, ...).
maxNodes is a max amount of nodes in memory, but not in secondary cache (file system, db).
If i'm not right and eviction policy can control file system cache size, please, give a more concrete answer.
Sorry for my bad english.
Thanks for help.
That's not supported. But you could have a secondary process that scanned and deleted directories that were over a certain age. Though, it'd be risky I think.
I think the JDBC cache loader and others cache loaders could do a better job tracking creation/modification time to allow a secondary process to prune data.
One way to do this in a safe way is to create your own keys that indicate the modification and/or creation time of that node. Iterate over all the JBoss Cache nodes and purge anything too old. Unfortunately, you do end up having to visit (and load) all the data in the cache.
Yes, there is no such feature to limit the size of persisted state on disk. Sensible contributions welcome. :-)