Sha256: e7c33aa4af7a7bcafe593e67bda10d3b85dd44836894325796fcf6275d07b862

Contents?: true

Size: 505 Bytes

Versions: 18

Compression:

Stored size: 505 Bytes

Contents

# frozen_string_literal: true

module Frodo
  module Concerns
    module Caching
      # Public: Runs the block with caching disabled.
      #
      # block - A query/describe/etc.
      #
      # Returns the result of the block
      def without_caching
        options[:use_cache] = false
        yield
      ensure
        options.delete(:use_cache)
      end

      private

      # Internal: Cache to use for the caching middleware
      def cache
        options[:cache]
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
frodo-0.12.8 lib/frodo/concerns/caching.rb
frodo-0.12.7 lib/frodo/concerns/caching.rb
frodo-0.12.6 lib/frodo/concerns/caching.rb
frodo-0.12.5 lib/frodo/concerns/caching.rb
frodo-0.12.4 lib/frodo/concerns/caching.rb
frodo-0.12.2 lib/frodo/concerns/caching.rb
frodo-0.12.1 lib/frodo/concerns/caching.rb
frodo-0.12.0 lib/frodo/concerns/caching.rb
frodo-0.11.0 lib/frodo/concerns/caching.rb
frodo-0.10.8 lib/frodo/concerns/caching.rb
frodo-0.10.7 lib/frodo/concerns/caching.rb
frodo-0.10.6 lib/frodo/concerns/caching.rb
frodo-0.10.5 lib/frodo/concerns/caching.rb
frodo-0.10.4 lib/frodo/concerns/caching.rb
frodo-0.10.3 lib/frodo/concerns/caching.rb
frodo-0.10.2 lib/frodo/concerns/caching.rb
frodo-0.10.1 lib/frodo/concerns/caching.rb
frodo-0.10.0 lib/frodo/concerns/caching.rb