On 2014-01-05 21:34, Andy Parker wrote:
On Thu, May 1, 2014 at 11:24 AM, Joachim Thuau <goo...@korigan.net
<mailto:goo...@korigan.net>> wrote:


All of the caching control is now on a per-environment basis. The new
environment.conf file can specify that particular environment's
environment_timeout value. So in order to get this kind of behavior
would either add a new setting for the environment.conf or add a new
valid value for environment_timeout. I'm thinking that adding a "manual"
value to environment.conf would be doable.

        # Clear the 'production' environment cache
        puppet cache clear

        # Clear the 'test' environment cache
        puppet cache clear --env='test'


I think those commands would be easily done. You just need to list the
environments, get the configuration for each one and touch the
environment's directory. Right now the don't make the environment's
directory available on that object in the code, AFAIK, but exposing that
should be trivial.


I can imagine that MANUAL control is always there irrespective of the timeout. This way you can have a long timeout set (say an hour), but you can also manually touch the directory. This way no additional settings are required. I don't think there is any harm in always allowing a manual refresh. However, if changes are made as a checkout/pull of a complete environment, it may not behave right depending on the order the files are updated (which depends on the SCM system in use), so I am not yet convinced that we can simply use the environment's directory itself as the file to watch.

It was complications like these that made us not implement this in
a way that at first appears to be both simple and obvious (i.e. watch the environment's directory).

A safe implementation would be to have a second hierarchy of files that are used solely for cache control. If we have a single control that just flushes all caches the design is somewhat less ugly...

I so want to see a file called 'tickle_me_elmo" :-)

- henrik


--
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 puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/ljue6i%24p2r%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to