18 19 20
# File 'lib/notificon/cache.rb', line 18 def cache_delete(key) Notificon.cache.delete("notificon_#{key}") if cache_enabled? end
Returns:
6 7 8
# File 'lib/notificon/cache.rb', line 6 def cache_enabled? Notificon.cache end
10 11 12 13 14 15 16
# File 'lib/notificon/cache.rb', line 10 def cache_fetch(key) if cache_enabled? Notificon.cache.fetch("notificon_#{key}") { yield } else yield end end