Class: Blacklight::AccessControls::PermissionsCache
- Inherits:
-
Object
- Object
- Blacklight::AccessControls::PermissionsCache
- Defined in:
- lib/blacklight/access_controls/permissions_cache.rb
Instance Method Summary collapse
- #clear ⇒ Object
- #get(pid) ⇒ Object
-
#initialize ⇒ PermissionsCache
constructor
A new instance of PermissionsCache.
- #put(pid, doc) ⇒ Object
Constructor Details
#initialize ⇒ PermissionsCache
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
#clear ⇒ Object
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 |