Sohan
Sohan

Reputation: 6809

Ehcache data persistent based on timeToIdleSeconds and timeToLive?

I am aware about the difference between timeToIdleSeconds and timeToLiveSeconds. But if my cache also persist data on disk will these parameters remove data from disk after expiration as well or theses parameters removes data from memory only.

If i want to configure these parameters to remove data from disk after expiration how can i configure it.

Please suggest.

Upvotes: 0

Views: 165

Answers (1)

Louis Jacomet
Louis Jacomet

Reputation: 14500

TTI and TTL are applied to all storage tiers of Ehcache, which includes the disk tier.

Note that Ehcache does not use a background process for removing expired entries, so they will be removed:

  • if accessed after their expiration time, then get will remove the mapping from the cache and not return it,
  • or through eviction.

Upvotes: 2

Related Questions