summaryrefslogtreecommitdiffstats
path: root/lib/puppet/node
diff options
context:
space:
mode:
authorEthan Rowe <ethan@endpoint.com>2009-04-06 11:34:12 -0400
committerJames Turnbull <james@lovedthanlost.net>2009-04-22 14:39:37 +1000
commit75f1923049d5e1edfd3b9e9790a96b487cdef305 (patch)
tree6cbea71de5c6c8e366b1435abb673d1d376179ff /lib/puppet/node
parentbab45c4a3006867c500b30df9b91b7b46c17dff9 (diff)
downloadpuppet-75f1923049d5e1edfd3b9e9790a96b487cdef305.tar.gz
puppet-75f1923049d5e1edfd3b9e9790a96b487cdef305.tar.xz
puppet-75f1923049d5e1edfd3b9e9790a96b487cdef305.zip
Initial implementation of a "cache accumulator" behavior.
Mix Puppet::Util::CacheAccumulator into an ActiveRecord-like class, and then for any attribute in that class on which you are likely to call find_or_create_by_*, specify: accumulates :foo and instead of :find_or_create_by_foo use :accumulate_by_foo. The class will cache known results keyed by values of :foo. Do an initial bulk-lookup: class.accumulate_by_foo('foo1', 'foo2', 'foo3', 'foo4')
Diffstat (limited to 'lib/puppet/node')
0 files changed, 0 insertions, 0 deletions