# File lib/puppet/util/storage.rb, line 24
24:     def self.cache(object)
25:         if object.is_a? Puppet::Type
26:             # We used to store things by path, now we store them by ref.
27:             # In oscar(0.20.0) this changed to using the ref.
28:             if @@state.include?(object.path)
29:                 @@state[object.ref] = @@state[object.path]
30:                 @@state.delete(object.path)
31:             end
32:             name = object.ref
33:         elsif object.is_a?(Symbol)
34:             name = object
35:         else
36:             raise ArgumentError, "You can only cache information for Types and symbols"
37:         end
38: 
39:         return @@state[name] ||= {}
40:     end