> I'm not very familiar with ruby, so feedback is welcome. This patch is just
> for review and must definitely be improved. I would first of all like to
> know if this is the way things should be done or if I've completely missed
> the point.

Thanks for the patch, it's great to have something to discuss and
think about the implications.

If you're ever on irc feel free to ping me (nasrat).

> My idea was to be able to pass a "ttl" parameter to any fact, cache the
> result in a file and read the value from this file if it's not newer than
> the TTL. It would be used this way:
>
>  # cache fact for one hour
>  Facter.add(:myfact, :ttl => 3600) do
>    [...]
>
> I mainly had in mind the need to avoid constantly probing web services
> which aren't updated that frequently. But maybe Luke had something else in
> mind when reporting the issue ?
>
> Before continuing, I would appreciate some input on the following
> questions:
>
>  - is it sufficient to just store the value in plain text ? Or should it be
>   serialized in yaml or whatever ?

For now we're just key/value, we will be working on a model that is
richer, so having a cachable interface and being able to switch the
backend is the way to go.

>  - would it be an idea to have infinite ttl (:ttl => -1) ? Presuming some
>   fact values would never changes.

I think so,

>  - where and how should facts get cached ? Obviously /tmp/<factname> was
>   just for testing.

Ah just read this after commenting on the patch!

Paul

--~--~---------~--~----~------------~-------~--~----~
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