module Legion::Extensions::Helpers::Cache

Public Instance Methods

cache_get(key) click to toggle source
# File lib/legion/extensions/helpers/cache.rb, line 17
def cache_get(key)
  Legion::Cache.get(cache_namespace + key)
end
cache_namespace() click to toggle source
# File lib/legion/extensions/helpers/cache.rb, line 9
def cache_namespace
  @cache_namespace ||= lex_name
end
cache_set(key, value, ttl: 60, **) click to toggle source
# File lib/legion/extensions/helpers/cache.rb, line 13
def cache_set(key, value, ttl: 60, **)
  Legion::Cache.set(cache_namespace + key, value, ttl: ttl)
end