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

Constant Summary collapse

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

Class Method Summary collapse

Class Method Details

.apply(app, cache_url) ⇒ Object



20
21
22
23
# File 'lib/twelvefactor/environment/cache.rb', line 20

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