123456789_123456789_123456789_123456789_123456789_

Class: Sprockets::SassProcessor::CacheStore

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Sass::CacheStores::Base
Instance Chain:
self, Sass::CacheStores::Base
Inherits: Sass::CacheStores::Base
  • Object
Defined in: lib/sprockets/sass_cache_store.rb

Overview

Internal: Cache wrapper for ::Sprockets cache adapter.

Constant Summary

Class Method Summary

Instance Method Summary

Constructor Details

.new(cache, version) ⇒ CacheStore

[ GitHub ]

  
# File 'lib/sprockets/sass_cache_store.rb', line 10

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

Instance Method Details

#_retrieve(key, version, sha)

[ GitHub ]

  
# File 'lib/sprockets/sass_cache_store.rb', line 18

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

#_store(key, version, sha, contents)

[ GitHub ]

  
# File 'lib/sprockets/sass_cache_store.rb', line 14

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

#path_to(key)

[ GitHub ]

  
# File 'lib/sprockets/sass_cache_store.rb', line 22

def path_to(key)
  key
end