Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic stale cache cleaner #108

Open
aik099 opened this issue Dec 22, 2016 · 0 comments
Open

Add automatic stale cache cleaner #108

aik099 opened this issue Dec 22, 2016 · 0 comments
Labels

Comments

@aik099
Copy link
Member

aik099 commented Dec 22, 2016

How it works now:

The file-based caching system is used where expiration of each cache entry is stored in corresponding file. The only way to invalidate cache is to access it and that will delete old cache and put new version of data in it. This results in lots of caches, that are not accessed frequently just laying around and taking valuable disk space.

How it should work:

  1. create CacheManager::deleteExpired method, that will walk through all caches and delete ones, that are expired
  2. add cache.expiration.checked config setting, that would store timestamp when expired caches were last cleared
  3. as part of application initialization (once check if last expired cache time is missing or older than 1 day) and if it is run CacheManager::deleteExpired method and store new expired cache checking date
@aik099 aik099 added the feature label Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant