Sha256: bd83de6feb98263a5cfcfe4fb1ee8a581ab03998d23d3c7d9aea7b260093c7c3

Contents?: true

Size: 578 Bytes

Versions: 1

Compression:

Stored size: 578 Bytes

Contents

require 'glue/cache/memory'
require 'nitro/session'

module Nitro

Logger.debug "Using Memory sessions."

Session.cache = MemoryCache.new

end

# * George Moschovitis  <gm@navel.gr>

=begin

module Nitro

  class MemorySessionStore < SyncHash

    # Perform session garbage collection. Typically this method
    # is called from a cron like mechanism (for example using
    # script/runner).
    
    def gc!
      delete_if { |key, s| s.expired? }
    end

    alias :all :values
  end

  Session.store = MemorySessionStore.new

end

# * George Moschovitis  <gm@navel.gr>
=end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nitro-0.28.0 lib/nitro/session/memory.rb