lib/cachetastic/cache.rb in cachetastic-3.5.1 vs lib/cachetastic/cache.rb in cachetastic-3.5.2
- old
+ new
@@ -33,9 +33,18 @@
def method_missing(sym, *args, &block)
self.instance.send(sym, *args, &block)
end
+ def available_caches
+ @available_caches ||= []
+ end
+
+ def inherited(klass)
+ available_caches << klass
+ super
+ end
+
end # class << self
# Returns an object from the cache for a given key.
# If the object comes back as nil and a block is given
# that block will be run and the results of the block
\ No newline at end of file