On Wed, 2008-10-15 at 14:54 -0500, Luke Kanies wrote: > If you're going to use class variables (or really, anything that gets > cached between transactions) you need to flush the variables between > transactions. > > It might be as easy as setting a ttl on the cached values -- never > return values older than 0.5 of the runinterval, for instance. > > You definitely don't want to just have a single value and stick with > it for the life of a process, though. > > You probably also need some way to invalidate that cache when a file > gets changed. > > You might want to look at util/cacher.rb in the master branch -- it'd > be straightforward to backport it.
Ahh, great point... I hadn't considered the long-running process scenario. Thus far I've only done minimal experiments with running Puppet as a daemon and usually do one-shot runs. I'll take a look at util/cacher.rb, but I like the ttl approach too. I knew that fix seemed too easy.... :) Thanks for the review. Sean --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
