Class: Sprockets::SassProcessor::CacheStore

Inherits:
Sass::CacheStores::Base
  • Object
show all
Defined in:
lib/sprockets/sass_processor.rb

Overview

Internal: Cache wrapper for Sprockets cache adapter.

Constant Summary collapse

VERSION =
'1'

Instance Method Summary collapse

Constructor Details

#initialize(cache, version) ⇒ CacheStore



267
268
269
# File 'lib/sprockets/sass_processor.rb', line 267

def initialize(cache, version)
  @cache, @version = cache, "#{VERSION}/#{version}"
end

Instance Method Details

#_retrieve(key, version, sha) ⇒ Object



275
276
277
# File 'lib/sprockets/sass_processor.rb', line 275

def _retrieve(key, version, sha)
  @cache._get("#{@version}/#{version}/#{key}/#{sha}")
end

#_store(key, version, sha, contents) ⇒ Object



271
272
273
# File 'lib/sprockets/sass_processor.rb', line 271

def _store(key, version, sha, contents)
  @cache._set("#{@version}/#{version}/#{key}/#{sha}", contents)
end

#path_to(key) ⇒ Object



279
280
281
# File 'lib/sprockets/sass_processor.rb', line 279

def path_to(key)
  key
end