Module: Mobility::Backends::KeyValue::Cache
- Defined in:
- lib/mobility/backends/key_value.rb
Backend Configuration collapse
Instance Method Details
#clear_cache ⇒ Object
132 133 134 |
# File 'lib/mobility/backends/key_value.rb', line 132 def clear_cache @cache = {} end |
#translation_for(locale, **options) ⇒ Object
123 124 125 126 127 128 129 130 |
# File 'lib/mobility/backends/key_value.rb', line 123 def translation_for(locale, **) return super(locale, ) if .delete(:cache) == false if cache.has_key?(locale) cache[locale] else cache[locale] = super(locale, **) end end |