This project is archived and is in readonly mode.
Support for options[:expires_in] for ActiveSupport::Cache::FileStore
-
Roman Shterenzon
- 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
According to my benchmark on my VMWare Linux it added 7 microseconds to every read from cache. IMHO it's tolerable.
-
Roman Shterenzon
- 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
- Title changed from [PATCH] Support for options[:expires_in] for ActiveSupport::Cache::FileStore to Support for options[:expires_in] for ActiveSupport::Cache::FileStore
-
Repository
(from [b5775c2b3efb3ae5ef9074d26f6fc3e302a4f6f0]) Add expiry support File cache store [#1693 Support for options[:expires_in] for ActiveSupport::Cache::FileStore state:resolved] [Roman Shterenzon, Pratik Naik] http://github.com/rails/rails/commit/b5775c2b3efb3ae5ef9074d26f6fc3...
-
Repository
(from [4fca7aab84bedbafce76328bd2ca5224ddbe5db9]) Add expiry support File cache store [#1693 Support for options[:expires_in] for ActiveSupport::Cache::FileStore state:resolved] [Roman Shterenzon, Pratik Naik] http://github.com/rails/rails/commit/4fca7aab84bedbafce76328bd2ca52...
-
Evgeniy Dolzhenko
I believe that
FileStore#exist?should be consistent withFileStore#readin presence of:expires_inoption, i.e.exist?shouldn't returntrueif cache is already expired andreadis going to returnnil.Attached the patches for master and 2-3-stable.
