Issue #4519 has been updated by Peter Meier.
> * There should be a simple way to mark a fact as cache-once-per-boot > * There should definitely be a no-caching mode and probably --ignorecache > just like Puppet both +1 > * puppetd --ignorecache should probably cause Facter to ignore the cache hmm I'm not sure because @--test@ implies @--ignorecache@ which is used a lot for immediate cli runs. How about a new flag, such as @--ignorefactercache@ ? > How do we deal with non-privileged users? Each user has a separate cache? > They read from the privileged cache location but don't update it? Good point. Firs I thought that the second solution might be the appropriate one. But then I was thinking about the problem of facts revealing sensitive information. This can currently be restricted with @confine :id => 'root'@ and if the sensitive information is also only readable by root there is currently no problem with that. But where would we cache such information in the future? The cache would make such information available too all users. So maybe we should go with a per user cache. ---------------------------------------- Feature #4519: Facter should provide a convenient way to cache values http://projects.puppetlabs.com/issues/4519 Author: Peter Meier Status: Accepted Priority: Normal Assigned to: Category: library Target version: 1.6.0 Keywords: Branch: I think this have discussed already various times and it is even planned?!. But I couldn't find a logged ticket and as I stumpled over that problem once again I thought I might want to file a feature request: Facter should provide a way to: 1. cache facts with a certain timeout, so that the fact value gets cache for the defined time 1. provide a way to cache any kind of data for a certain amount of time Why? We might want to have facts that take some time to calculate, however that don't change much. Or there might be data required to calucate a certain fact which high resource intensive, but doesn't change often. So what I like to have is similar to the @confine@ a way to set @timeout@, so that if this is set to some seconds/minutes (?) the fact isn't calculated again until the timeout expired. For the second point I'd like to have a simple key value store with timeout capability built into facter, so I can cache output of commands, which can then be used amongst different facts. Example: xen management tools are getting slower the more VMs you start. Hence @xm list@ can get slower and slower and if you have various facts that are depending on the output of that command and you take the naive approach and call @xm list@ a couple of times, you slowdown facter and hence puppet runs enormously. If I have only one fact using the output it would be nice to let facter cache that fact. However, if I have multiple facts depending on the output of @xm list@ I might want to cache also the output of @xm list@ so that @xm list@ is called really only once per facter run. Currently you can do that with your own cache implementation hacked into facts, but I think it would be nicer if facter would provide a convenient way to cache things. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en.
