yangxu998 / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Cache.cleanUp() #687

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In order to improve the cache clean-up process, it would be nice to be able to 
execute a clean-up method as soon as the object is expired.

I can see the following solutions:
- add a simple method to CacheCleaner, for instance quickCleanUp()
that would flag that clean up should be done as soon as the object is
removed from the cache
- add a parameter to the expireAfterWrite method (ASAP, NEXT_ACCESS,
NEXT_WRITE etc...) 

Thanks!

Julien

Original issue reported on code.google.com by fauch...@gmail.com on 12 Aug 2011 at 2:16

GoogleCodeExporter commented 9 years ago
We've also previously explored adding CacheBuilder.cleanupExecutor.

Original comment by fry@google.com on 12 Aug 2011 at 2:44

GoogleCodeExporter commented 9 years ago
We will add a (properly-named) Cache.performYourHousekeepingStuffNow() method. 
You could use that from a ScheduledExecutorService, or whatever. Name 
suggestions welcome if they're quick. :)

Blocking release 10 on this.

Original comment by kevin...@gmail.com on 1 Sep 2011 at 5:32

GoogleCodeExporter commented 9 years ago
Issue 681 has been merged into this issue.

Original comment by kevin...@gmail.com on 1 Sep 2011 at 5:35

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 1 Sep 2011 at 11:25

GoogleCodeExporter commented 9 years ago

Original comment by yrfselrahc@gmail.com on 2 Sep 2011 at 11:21

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:09