Sha256: 96264e02a06975e8983795797d86c24ab962a275b4f30c0d987550cb67e90f8c

Contents?: true

Size: 314 Bytes

Versions: 7

Compression:

Stored size: 314 Bytes

Contents

# frozen_string_literal: true

module Dynamoid
  # @private
  module Middleware
    class IdentityMap
      def initialize(app)
        @app = app
      end

      def call(env)
        Dynamoid::IdentityMap.clear
        @app.call(env)
      ensure
        Dynamoid::IdentityMap.clear
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dynamoid-3.11.0 lib/dynamoid/middleware/identity_map.rb
dynamoid-3.10.0 lib/dynamoid/middleware/identity_map.rb
dynamoid-3.9.0 lib/dynamoid/middleware/identity_map.rb
dynamoid-3.8.0 lib/dynamoid/middleware/identity_map.rb
dynamoid-3.7.1 lib/dynamoid/middleware/identity_map.rb
dynamoid-3.7.0 lib/dynamoid/middleware/identity_map.rb
dynamoid-3.6.0 lib/dynamoid/middleware/identity_map.rb