Class: EntityCache::Store::Internal::Scope::Global
- Inherits:
-
EntityCache::Store::Internal
- Object
- EntityCache::Store::Internal
- EntityCache::Store::Internal::Scope::Global
- Defined in:
- lib/entity_cache/store/internal/scope/global.rb
Defined Under Namespace
Classes: ThreadSafeHash
Instance Attribute Summary
Attributes inherited from EntityCache::Store::Internal
Instance Method Summary collapse
Methods inherited from EntityCache::Store::Internal
build, configure, #count, #delete, #empty?, #get, #put
Instance Method Details
#records ⇒ Object
6 7 8 |
# File 'lib/entity_cache/store/internal/scope/global.rb', line 6 def records records_by_subject[subject] end |
#records_by_subject ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/entity_cache/store/internal/scope/global.rb', line 10 def records_by_subject mutex.synchronize do @@records_by_subject ||= {} @@records_by_subject[subject] ||= ThreadSafeHash.new @@records_by_subject end end |