summaryrefslogtreecommitdiffstats
path: root/examples/modules/sample-module/lib/puppet/parser
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-07-21 11:41:04 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-08-19 13:52:56 -0700
commitd49dd9ec3ab26d122c5c2a78482136f2a5f3efda (patch)
tree7214ef323e1a9728841287096a7ccef4529b09fc /examples/modules/sample-module/lib/puppet/parser
parent546e0f98e3c6bfcb35163d1c6c19e0b4cb02e230 (diff)
downloadpuppet-d49dd9ec3ab26d122c5c2a78482136f2a5f3efda.tar.gz
puppet-d49dd9ec3ab26d122c5c2a78482136f2a5f3efda.tar.xz
puppet-d49dd9ec3ab26d122c5c2a78482136f2a5f3efda.zip
Remove cached_attrs from Puppet::Type::File
These values needn't be cached_attrs, because they can be managed manually. 'stat' does need to be cached, so that we avoid statting the file for each property we want to check from disk. The 'content' attribute of 'source' also needs to be cached, because it's retrieved from the server, which we certainly don't want to do multiple times. We need a mechanism for invalidating the 'stat' after we've written the file, so we use a special value :needs_stat, which essentially represented "undefined". We use this rather than nil so that we can store a failed stat if it occurs. Because the content and metadata of our source file will never change, there is no need to be able to similarly expire the values of those attributes. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit 4b0c847f19d5db81758b5561bdc8196591209ef0) Conflicts: lib/puppet/type/file/source.rb
Diffstat (limited to 'examples/modules/sample-module/lib/puppet/parser')
0 files changed, 0 insertions, 0 deletions