Hi

>> @@ -68,6 +69,9 @@ class Facter::Util::Resolution
>>         @confines = []
>>         @value = nil
>>         @timeout = 0
>> +        if :ttl
>> +            @cache_file = "/tmp/" + name.to_s
>> +        end
> 
> You probably should be requiring tempfile and using that as we do
> support windows and it'll do the right thing. Also we'd probably want
> to ensure we don't have race conditions here.

as far as I understood tempfile removes the created file when the object
is finalized (if not told earlier with unlink), so after each run, the
files are gone. aren't they?

> I'd probably think we'd be better served with a cachable interface and
> a tempfile implementation like this as being one particular
> implementation (eg puppet could use an in memory cache), but this is a
> great start.

A common interface would be great to address the different problems on
different platforms. One issue with tempfiles we should keep in mind is
that the different distributions/platforms are handling tmp-folders
differently. And for example on RedHat-based Systems tmp-folders are
imho the wrong location as tmpwatch is managing them and introducing
another cache manager ;) I already had various problems with
applications writing to /tmp or /var/tmp and assuming that the files
remain there for the whole applications lifetime.
So on *nix systems I think /var/cache/facter would maybe the place to
go? No idea for windows.

Otherwise + 1 for the patch. Thanks a lot!

cheers pete

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to