class Sprockets::Cache::NullStore

Public: A compatible cache store that doesn't store anything. Used by default when no Environment#cache is configured.

Assign the instance to the Environment#cache.

environment.cache = Sprockets::Cache::NullStore.new

See Also

ActiveSupport::Cache::NullStore

Public Instance Methods

get(key) click to toggle source

Public: Simulate a cache miss.

This API should not be used directly, but via the Cache wrapper API.

key - String cache key.

Returns nil.

# File lib/sprockets/cache/null_store.rb, line 22
def get(key)
  nil
end
inspect() click to toggle source

Public: Pretty inspect

Returns String.

# File lib/sprockets/cache/null_store.rb, line 41
def inspect
  "#<#{self.class}>"
end
set(key, value) click to toggle source

Public: Simulate setting a value in the cache.

This API should not be used directly, but via the Cache wrapper API.

key - String cache key. value - Object value.

Returns Object value.

# File lib/sprockets/cache/null_store.rb, line 34
def set(key, value)
  value
end