Class: Blacklight::AccessControls::PermissionsCache

Inherits:
Object
  • Object
show all
Defined in:
lib/blacklight/access_controls/permissions_cache.rb

Instance Method Summary collapse

Constructor Details

#initializePermissionsCache

Returns a new instance of PermissionsCache.



4
5
6
# File 'lib/blacklight/access_controls/permissions_cache.rb', line 4

def initialize
  clear
end

Instance Method Details

#clearObject



16
17
18
# File 'lib/blacklight/access_controls/permissions_cache.rb', line 16

def clear
  @cache = {}
end

#get(pid) ⇒ Object



8
9
10
# File 'lib/blacklight/access_controls/permissions_cache.rb', line 8

def get(pid)
  @cache[pid]
end

#put(pid, doc) ⇒ Object



12
13
14
# File 'lib/blacklight/access_controls/permissions_cache.rb', line 12

def put(pid, doc)
  @cache[pid] = doc
end