Caffeine cache – multiple expire configurations

Expiration can be configured in multiple ways:

  • expireAfterWrite
  • expireAfterAccess
  • expireAfter(Expiry)

While all 3 methods look helpful, internally they configure different cache variables. My question is: what is the purpose to have dedicated variables for expiration configuration. At first glance, expireAfterWrite and expireAfterAccess could be implemented reusing expireAfter(Expiry) passing a certain Expiry object.

Read more here:

Content Attribution

This content was originally published by ipergenitsa at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: