Sha256: 8795e9469ea189b5a08809731630d5f25bcdbc818a60bb947b3b7acf1f41108e

Contents?: true

Size: 1 KB

Versions: 23

Compression:

Stored size: 1 KB

Contents

module ActiveSupport
  module Cache
    # A cache store implementation which doesn't actually store anything. Useful in
    # development and test environments where you don't want caching turned on but
    # need to go through the caching interface.
    #
    # This cache does implement the local cache strategy, so values will actually
    # be cached inside blocks that utilize this strategy. See
    # ActiveSupport::Cache::Strategy::LocalCache for more details.
    class NullStore < Store
      prepend Strategy::LocalCache

      def clear(options = nil)
      end

      def cleanup(options = nil)
      end

      def increment(name, amount = 1, options = nil)
      end

      def decrement(name, amount = 1, options = nil)
      end

      def delete_matched(matcher, options = nil)
      end

      private
        def read_entry(key, options)
        end

        def write_entry(key, entry, options)
          true
        end

        def delete_entry(key, options)
          false
        end
    end
  end
end

Version data entries

23 entries across 23 versions & 3 rubygems

Version Path
activesupport-5.1.7 lib/active_support/cache/null_store.rb
activesupport-5.1.7.rc1 lib/active_support/cache/null_store.rb
activesupport-5.1.6.2 lib/active_support/cache/null_store.rb
activesupport-5.1.6.1 lib/active_support/cache/null_store.rb
activesupport-5.1.6 lib/active_support/cache/null_store.rb
tdiary-5.0.8 vendor/bundle/gems/activesupport-5.1.5/lib/active_support/cache/null_store.rb
activesupport-5.1.5 lib/active_support/cache/null_store.rb
activesupport-5.1.5.rc1 lib/active_support/cache/null_store.rb
pract6-0.1.0 .gem/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/cache/null_store.rb
activesupport-5.1.4 lib/active_support/cache/null_store.rb
activesupport-5.1.4.rc1 lib/active_support/cache/null_store.rb
activesupport-5.1.3 lib/active_support/cache/null_store.rb
activesupport-5.1.3.rc3 lib/active_support/cache/null_store.rb
activesupport-5.1.3.rc2 lib/active_support/cache/null_store.rb
activesupport-5.1.3.rc1 lib/active_support/cache/null_store.rb
tdiary-5.0.5 vendor/bundle/gems/activesupport-5.1.2/lib/active_support/cache/null_store.rb
activesupport-5.1.2 lib/active_support/cache/null_store.rb
activesupport-5.1.2.rc1 lib/active_support/cache/null_store.rb
activesupport-5.1.1 lib/active_support/cache/null_store.rb
activesupport-5.1.0 lib/active_support/cache/null_store.rb