There's actually been some recent interest in this recently. This message (https://groups.google.com/forum/#!topic/puppet-dev/Iqs5jEGfu_0) was bounced around on puppet-dev for the last few weeks, which demonstrates that there is interest in/need for this feature. In addition, we got this pull request (https://github.com/puppetlabs/puppet/pull/1800) that was an initial approach to a class level flush. The implementation allowed you to do reference counting inside of the implementing class to know when the class was flushed, but it was closed because it only provided half the solution. I believe Tom Linkin is working on another approach to this, though.
On Mon, Jul 29, 2013 at 9:37 AM, Luke Kanies <[email protected]> wrote: > On Jul 28, 2013, at 9:37 PM, Ben Schofield <[email protected]> wrote: > > In my custom provider I do a prefetch for all the resources of a given > type and cache the data. I would like to be able to single flush to > persist all the changes (updates, additions, deletions) to all the > resources in one command. Something like a global flush that is called > after all the resources of a given type have been processed. Is this > possible or am I restricted to flushing on every resource? > > > Hi Ben - I don't think there is a class-wide 'flush'. > > The reason I didn't build that is that in most cases you don't know when a > given resource will actually be needed. E.g., you might have a Host, then > a Service, then a Host, then another Service. If you just flushed Host at > the end, then that first service (and, in fact, the second) might not work. > > Does your use case avoid this problem somehow? > > -- > Luke Kanies | http://about.me/lak | http://puppetlabs.com/ | > +1-615-594-8199 > Join us at PuppetConf 2013, August 22-23 in San Francisco - > http://bit.ly/pupconf13 > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/puppet-dev. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Adrien Thebo | Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-dev. For more options, visit https://groups.google.com/groups/opt_out.
