Class: FlagpoleSitta::CommonFs

Inherits:
Object
  • Object
show all
Defined in:
lib/flagpole_sitta/common_fs.rb

Class Method Summary collapse

Class Method Details

.app_hash_namespaceObject



7
8
9
# File 'lib/flagpole_sitta/common_fs.rb', line 7

def app_hash_namespace
  "#{Rails.application.class.to_s.split("::").first}/#{Rails.env}/"
end

.flagpole_cache_delete(key) ⇒ Object



19
20
21
# File 'lib/flagpole_sitta/common_fs.rb', line 19

def flagpole_cache_delete key
  Rails.cache.delete(app_hash_namespace + key.to_s)
end

.flagpole_cache_exist?(key) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/flagpole_sitta/common_fs.rb', line 23

def flagpole_cache_exist? key
  Rails.cache.exist?(app_hash_namespace + key.to_s)
end

.flagpole_cache_read(key) ⇒ Object



11
12
13
# File 'lib/flagpole_sitta/common_fs.rb', line 11

def flagpole_cache_read key
  Rails.cache.read(app_hash_namespace + key.to_s)
end

.flagpole_cache_write(key, value) ⇒ Object



15
16
17
# File 'lib/flagpole_sitta/common_fs.rb', line 15

def flagpole_cache_write key, value
  Rails.cache.write(app_hash_namespace + key.to_s, value)
end