Class: Orchestrate::Application::SimpleCacheRefs
- Inherits:
-
Object
- Object
- Orchestrate::Application::SimpleCacheRefs
- Includes:
- Singleton
- Defined in:
- lib/orchestrate_application/simple_cache_store.rb
Overview
Stores documents in cache, indexed by ref value.
Instance Method Summary collapse
- #document(ref) ⇒ Object
- #flush! ⇒ Object
-
#initialize ⇒ SimpleCacheRefs
constructor
A new instance of SimpleCacheRefs.
- #save(ref, document) ⇒ Object
Constructor Details
#initialize ⇒ SimpleCacheRefs
Returns a new instance of SimpleCacheRefs.
106 107 108 |
# File 'lib/orchestrate_application/simple_cache_store.rb', line 106 def initialize @@documents = {} end |
Instance Method Details
#document(ref) ⇒ Object
114 115 116 |
# File 'lib/orchestrate_application/simple_cache_store.rb', line 114 def document(ref) @@documents[ref] end |
#flush! ⇒ Object
118 119 120 |
# File 'lib/orchestrate_application/simple_cache_store.rb', line 118 def flush! @@documents = {} end |
#save(ref, document) ⇒ Object
110 111 112 |
# File 'lib/orchestrate_application/simple_cache_store.rb', line 110 def save(ref, document) @@documents[ref] = document end |