aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache/file_store.rb
diff options
context:
space:
mode:
authorMichael Grosser <michael@grosser.it>2015-11-18 12:16:01 -0800
committerMichael Grosser <michael@grosser.it>2015-11-19 20:49:37 -0800
commita8f773b05734b9a798ae9755d280ef95004ec711 (patch)
treea4e2f1bd6870dab03b3cb712ae35da482f427d9f /activesupport/lib/active_support/cache/file_store.rb
parent3d8a7c0e64fef726c22fd64911771cee8c467447 (diff)
downloadrails-a8f773b05734b9a798ae9755d280ef95004ec711.tar.gz
rails-a8f773b05734b9a798ae9755d280ef95004ec711.tar.bz2
rails-a8f773b05734b9a798ae9755d280ef95004ec711.zip
add deprecations for a smooth transition after #22215
Diffstat (limited to 'activesupport/lib/active_support/cache/file_store.rb')
-rw-r--r--activesupport/lib/active_support/cache/file_store.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb
index 9488b95214..dff2443bc8 100644
--- a/activesupport/lib/active_support/cache/file_store.rb
+++ b/activesupport/lib/active_support/cache/file_store.rb
@@ -137,6 +137,14 @@ module ActiveSupport
File.join(cache_path, DIR_FORMATTER % dir_1, DIR_FORMATTER % dir_2, *fname_paths)
end
+ def key_file_path(key)
+ ActiveSupport::Deprecation.warn(<<-MESSAGE.strip_heredoc)
+ `key_file_path` is deprecated and will be removed from Rails 5.1.
+ Please use `normalize_key` which will return a fully resolved key or nothing.
+ MESSAGE
+ key
+ end
+
# Translate a file path into a key.
def file_path_key(path)
fname = path[cache_path.to_s.size..-1].split(File::SEPARATOR, 4).last