This project is archived and is in readonly mode.
Support for options[:expires_in] for ActiveSupport::Cache::FileStore
Reported by Roman Shterenzon | January 4th, 2009 @ 06:09 PM | in 2.x
While this options is supported for the MemCache Store, this support is missing in FileStore. Fortunately it's quite simple to implement. I also modified the documentation where relevant. Please see the attached patch.
Comments and changes to this ticket
-
Roman Shterenzon January 6th, 2009 @ 04:12 PM
- no changes were found...
-
Roman Shterenzon January 27th, 2009 @ 06:47 PM
- Tag changed from 2.2-stable, cache, patch to 2.2-stable, active_support, cache, patch
- Assigned user set to josh
Please review and tell me if there are any problems with this patch. Thanks!
-
Roman Shterenzon January 29th, 2009 @ 09:46 AM
According to my benchmark on my VMWare Linux it added 7 microseconds to every read from cache. IMHO it's tolerable.
-
Roman Shterenzon February 2nd, 2009 @ 06:24 PM
- Assigned user set to josh
Please note, that my changed code (due to avoidance of rescue clause using the File.exist?) is about order of magnitude faster (~8) for non-existent files than the current version. Would you be so kind to look at this again? Thanks!
-
Pratik February 16th, 2009 @ 07:23 PM
- Title changed from [PATCH] Support for options[:expires_in] for ActiveSupport::Cache::FileStore to Support for options[:expires_in] for ActiveSupport::Cache::FileStore
-
Pratik June 21st, 2009 @ 05:41 PM
- State changed from new to resolved
Resolved in b5775c2b3efb3ae5ef9074d26f6fc3e302a4f6f0
-
Repository June 21st, 2009 @ 09:15 PM
(from [b5775c2b3efb3ae5ef9074d26f6fc3e302a4f6f0]) Add expiry support File cache store [#1693 state:resolved] [Roman Shterenzon, Pratik Naik] http://github.com/rails/rails/commit/b5775c2b3efb3ae5ef9074d26f6fc3...
-
Repository June 23rd, 2009 @ 10:50 PM
(from [4fca7aab84bedbafce76328bd2ca5224ddbe5db9]) Add expiry support File cache store [#1693 state:resolved] [Roman Shterenzon, Pratik Naik] http://github.com/rails/rails/commit/4fca7aab84bedbafce76328bd2ca52...
-
Evgeniy Dolzhenko March 1st, 2010 @ 10:34 PM
I believe that
FileStore#exist?
should be consistent withFileStore#read
in presence of:expires_in
option, i.e.exist?
shouldn't returntrue
if cache is already expired andread
is going to returnnil
.Attached the patches for master and 2-3-stable.
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>
People watching this ticket
Attachments
Referenced by
- 1693 Support for options[:expires_in] for ActiveSupport::Cache::FileStore (from [b5775c2b3efb3ae5ef9074d26f6fc3e302a4f6f0]) Add exp...
- 1693 Support for options[:expires_in] for ActiveSupport::Cache::FileStore (from [4fca7aab84bedbafce76328bd2ca5224ddbe5db9]) Add exp...