instance method
cache_key
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
cache_key(*args)
No documentation comment.
Parameters
-
argsrest
Source
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/cache.rb, line 66
def cache_key(*args)
# This assumes that only simple, native Ruby values are passed to I18n.translate.
# Also, in Ruby < 1.8.7 {}.hash != {}.hash
# (see http://paulbarry.com/articles/2009/09/14/why-rails-3-will-require-ruby-1-8-7)
# If args.inspect does not work for you for some reason, patches are very welcome :)
hash = RUBY_VERSION >= "1.8.7" ? args.hash : args.inspect
keys = ['i18n', I18n.cache_namespace, hash]
keys.compact.join('-')
end
Defined in activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/cache.rb line 66
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in I18n::Backend::Cache