Sha256: eaa4e808484c95e65f86eb165aaa7aa1de04550c99524c00b4a4a3a50e78429b

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

module StoredSession
  class Store < ActionDispatch::Session::AbstractSecureStore
    module Instrumentation
      extend ActiveSupport::Concern

      def instrument(operation, sid, **options, &blk)
        payload = { sid: sid&.private_id, **options }
        ActiveSupport::Notifications.instrument("session_#{operation}.stored_session", payload) do
          blk&.call(payload)
        end
      end

      ActiveSupport.run_load_hooks(:stored_session_store_instrumentation, self)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stored_session-0.2.0 lib/stored_session/store/instrumentation.rb