Reputation: 1679
I am trying to configure Ehcache with a disk persistence that does not initialize the disk cache until the heap is full. Is that possible?
Right now as soon as I initialize my cache I see that the disk cache is created on the file system. Most cases my heap will be big enough to contain my data, so thus I would not want to create a disk store that will not be used. I am using ehcache on a phone where disk space is an issue. And I could potentially need a 1GB disk persistence and so now it creates this large file everytime I initialize my cache.
Upvotes: 0
Views: 435
Reputation: 14500
While specific configuration on old versions will behave that way, since Ehcache 2.6.x the tiering model no longer works using overflow.
When you assign a disk tier, it becomes the authority and it will always contain all mappings, from the very first one inserted into the cache.
Upvotes: 1