lib/asynchronic/data_store/in_memory.rb in asynchronic-1.4.0 vs lib/asynchronic/data_store/in_memory.rb in asynchronic-1.5.0

- old
+ new

@@ -21,15 +21,20 @@ def delete(key) @hash.delete key.to_s end + def delete_cascade(key) + keys = self.keys.select { |k| k.sections.first == key } + keys.each { |k| delete k } + end + def keys - @hash.keys.map { |k| Key.new k } + @hash.keys.map { |k| Key[k] } end def synchronize(key, &block) - @keys_mutex[key].synchronize &block + @keys_mutex[key].synchronize(&block) end def connection_args [object_id] end \ No newline at end of file