Class: Twelvefactor::Environment::Cache

Inherits:
Object
  • Object
show all
Defined in:
lib/twelvefactor/environment/cache.rb,
lib/twelvefactor/environment/cache.rb

Defined Under Namespace

Classes: Dalli, File, Null, Redis

Constant Summary collapse

VERSION =
"1.0.2".freeze
HANDLERS =
{
  "dalli" => Dalli,
  "file" => File,
  "null" => Null,
  "redis" => Redis
}.freeze

Class Method Summary collapse

Class Method Details

.apply(app, cache_url) ⇒ Object



22
23
24
25
# File 'lib/twelvefactor/environment/cache.rb', line 22

def self.apply app, cache_url
  handler = HANDLERS.fetch cache_url.scheme, Null
  handler.apply app, cache_url
end