I would strongly recommend you don’t use TTI in Ehcache, it’s essentially deprecated: https://github.com/ehcache/ehcache3/issues/1097
Ehcache uses tier capacity constraints to control the size of the cache. This recent discussion may also be useful here:
https://github.com/ehcache/ehcache3/issues/2909
As regards emptying the cache after some time: there is no builtin support for this, but you could obviously drive this from the outside. In reality the “right” way to use Ehcache here is to set sizes on the configured tiers, and then if needed set a TTL according to how “stale” you will tolerate your data being (assuming you don’t have an externally driven invalidation process). In this (and all caching contexts) – TTL stands for “Time to Live”. Ehcache interprets this as meaning values older than the TTL will not be returned by the cache. This doesn’t mean that they will be automatically removed from the cache when they hit the TTL… we just allow them to naturally fall out when the cache eviction thresholds are hit.
Chris
--
You received this message because you are subscribed to the Google Groups "ehcache-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ehcache-user...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ehcache-users/c6f96511-65e3-4e82-9536-b997f0fabf9cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ehcache-users/BLAPR20MB4177D2A8E25F8F5E9B961732AE3C9%40BLAPR20MB4177.namprd20.prod.outlook.com.