This project is archived and is in readonly mode.
Fix FileStore cleanup method
Reported by Brian Durand | January 18th, 2011 @ 06:10 PM
The cleanup method on ActiveSupport::Cache::FileStore on the 3.0 branch is defined but doesn't actually work. I have fixed the implementation so it can be used to clean up old cache entries either by expiration time or by how recently they've been used and added tests.
This method is needed to keep the cache from growing without bound until if fills up the disk.
The syntax is:
Rails.cache.cleanup(:expired_only => true)
or
Rails.cache.cleanup(:not_accessed_in => 2.days)
Comments and changes to this ticket
-
Brian Durand January 18th, 2011 @ 06:18 PM
- Tag changed from caching to caching, patch
-
Xavier Noria January 25th, 2011 @ 09:52 AM
- Assigned user set to Xavier Noria
- Importance changed from to Low
-
Brian Durand February 21st, 2011 @ 06:07 PM
New patch file that include documentation update to Rails guide for caching.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>