Method: Puppet::Util::Storage.cache

Defined in:
lib/puppet/util/storage.rb

.cache(object) ⇒ Object

Return a hash that will be stored to disk. It’s worth noting here that we use the object’s full path, not just the name/type combination. At the least, this is useful for those non-isomorphic types like exec, but it also means that if an object changes locations in the configuration it will lose its cache.



24
25
26
27
28
29
30
31
32
# File 'lib/puppet/util/storage.rb', line 24

def self.cache(object)
  if object.is_a?(Symbol)
    name = object
  else
    name = object.to_s
  end

  @@state[name] ||= {}
end