migrator / guava-libraries-2

Guava: Google Core Libraries for Java 1.6+
0 stars 0 forks source link

Support for partially random expiration #11

Open migrator opened 9 years ago

migrator commented 9 years ago

When rolling out an upgrade to a cluster of Guava powered instances there's a risk that local caches will expire within the same time.

Proposal: Add a method to CacheBuilder that allows for randomization of expiration. This will eventually spread expiration evenly over time.

Workaround: Instantiate a Random instance and use it as input to .expire* method. Cumbersome.

I'd love to hear your input on this.

relevance: 1