Maintains a collection of MetaStore and EntityStore instances keyed by URI. A single instance of this class can be used across a single process to ensure that only a single instance of a backing store is created per unique storage URI.
Methods
public class
public instance
Public class methods
instance
()
[show source]
# File lib/rack/cache/storage.rb, line 57 57: def self.instance 58: @@singleton_instance 59: end
new
()
[show source]
# File lib/rack/cache/storage.rb, line 12 12: def initialize 13: @metastores = {} 14: @entitystores = {} 15: end
Public instance methods
clear
()
[show source]
# File lib/rack/cache/storage.rb, line 25 25: def clear 26: @metastores.clear 27: @entitystores.clear 28: nil 29: end
resolve_entitystore_uri
(uri)
[show source]
# File lib/rack/cache/storage.rb, line 21 21: def resolve_entitystore_uri(uri) 22: @entitystores[uri.to_s] ||= create_store(EntityStore, uri) 23: end
resolve_metastore_uri
(uri)
[show source]
# File lib/rack/cache/storage.rb, line 17 17: def resolve_metastore_uri(uri) 18: @metastores[uri.to_s] ||= create_store(MetaStore, uri) 19: end