Sha256: 3a91f9fd2a06af63ec2da1dc25d4d287cf0dc104b7e2289fd19e03e2d9a3f12b

Contents?: true

Size: 247 Bytes

Versions: 1

Compression:

Stored size: 247 Bytes

Contents

module RestrictCache
  module Accessible
    THREAD_KEY = :restrict_cache

    def collection
      Thread.current[THREAD_KEY] ||= Cacheable.new
    end

    def clear
      Thread.current[THREAD_KEY] = nil
    end
  end

  extend Accessible
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
restrict_cache-0.1.0 lib/restrict_cache/accessible.rb