Module: I18n::Backend::Cache

Defined in:
lib/i18n/backend/cache.rb

Overview

TODO Should the cache be cleared if new translations are stored?

Instance Method Summary collapse

Instance Method Details

#translate(locale, key, options = EMPTY_HASH) ⇒ Object



80
81
82
# File 'lib/i18n/backend/cache.rb', line 80

def translate(locale, key, options = EMPTY_HASH)
  I18n.perform_caching? ? fetch(cache_key(locale, key, options)) { super } : super
end