jsr107 / jsr107spec

JSR107 Cache Specification
Apache License 2.0
413 stars 164 forks source link

ExpiryPolicy combining expiry after modification and after access #355

Closed cruftex closed 7 years ago

cruftex commented 8 years ago

A good question popped up in Stack Overflow: http://stackoverflow.com/questions/37329076/how-to-configure-apache-ignite-cache-with-multiple-expiry-policies

As I understand it, there is no way to combine two expiry concepts. Whenever a ExpiryPolicy method returns a non null duration the previous expiry duration will be reset. The way it is designed there is only a single expiry duration.

This is non obvious for the user and many people will fall into this.

Should we add some clarification? What is the background of the current design? It seems to me that often people want to mix TTL and TTI, and it is actually rare that people want TTI alone. Is TTI only really useful? Thoughts?

cruftex commented 8 years ago

Probably some clarification is useful. Need a little bit more input here. Put it on the ML.