aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache/file_store.rb
diff options
context:
space:
mode:
authorMichael Grosser <michael@grosser.it>2015-11-06 06:17:05 -0800
committerMichael Grosser <michael@grosser.it>2015-11-06 12:16:28 -0800
commit894336a23f0d6e1987e32a6e5825f9f94ca5ced3 (patch)
treed20d47bb0ac4d88078447f09b2cf5076da169edd /activesupport/lib/active_support/cache/file_store.rb
parentcb67c819338d75c07a591dc23759747c740a5088 (diff)
downloadrails-894336a23f0d6e1987e32a6e5825f9f94ca5ced3.tar.gz
rails-894336a23f0d6e1987e32a6e5825f9f94ca5ced3.tar.bz2
rails-894336a23f0d6e1987e32a6e5825f9f94ca5ced3.zip
use prepend instead of extending every instance
extending an instance with a module puts the methods on top of it, prepend does the same but on the class level, so less work for us and more standard way of doing things
Diffstat (limited to 'activesupport/lib/active_support/cache/file_store.rb')
-rw-r--r--activesupport/lib/active_support/cache/file_store.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb
index b7da30123a..9a88fc286a 100644
--- a/activesupport/lib/active_support/cache/file_store.rb
+++ b/activesupport/lib/active_support/cache/file_store.rb
@@ -10,6 +10,7 @@ module ActiveSupport
# FileStore implements the Strategy::LocalCache strategy which implements
# an in-memory cache inside of a block.
class FileStore < Store
+ prepend Strategy::LocalCache
attr_reader :cache_path
DIR_FORMATTER = "%03X"
@@ -20,7 +21,6 @@ module ActiveSupport
def initialize(cache_path, options = nil)
super(options)
@cache_path = cache_path.to_s
- extend Strategy::LocalCache
end
# Deletes all items from the cache. In this case it deletes all the entries in the specified