Sha256: 47526aa5d8aa442cefb8e4fe7f727a298d3c57b9a041b8d6a60eae1f60fe882e

Contents?: true

Size: 1.03 KB

Versions: 91

Compression:

Stored size: 1.03 KB

Contents

module Sprockets
  class Cache
    # 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
    #
    class NullStore
      # Public: Simulate a cache miss.
      #
      # This API should not be used directly, but via the Cache wrapper API.
      #
      # key - String cache key.
      #
      # Returns nil.
      def get(key)
        nil
      end

      # 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.
      def set(key, value)
        value
      end

      # Public: Pretty inspect
      #
      # Returns String.
      def inspect
        "#<#{self.class}>"
      end
    end
  end
end

Version data entries

91 entries across 85 versions & 15 rubygems

Version Path
sprockets-3.7.5 lib/sprockets/cache/null_store.rb
sprockets-3.7.4 lib/sprockets/cache/null_store.rb
sprockets-3.7.3 lib/sprockets/cache/null_store.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
spiral_form-0.1.1 vendor/bundle/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
spiral_form-0.1.0 vendor/bundle/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
zuora_connect_ui-0.7.1 vendor/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
zuora_connect_ui-0.7.0 vendor/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
tdiary-5.0.11 vendor/bundle/gems/sprockets-3.7.2/lib/sprockets/cache/null_store.rb
sprokovuln-0.2.0 vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/cache/null_store.rb