Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Optimization Bug? #15

Open
venturaville opened this issue Oct 14, 2013 · 2 comments
Open

Optimization Bug? #15

venturaville opened this issue Oct 14, 2013 · 2 comments

Comments

@venturaville
Copy link

In theory the caching should protect updates from happening constantly (needlessly). Without some mechanism to tie some sort of clear cache mechanism to an update having happened on this chef run the protection does not happen in practice. In fact without a clear cache every chef run results in an attempted update if there is any difference between circonus and the local copy. This is VERY slow to be doing every chef run.

Suggested solution: Trigger a cache clear at the end of the run if we perceive a difference that needed to be updated for.

@venturaville
Copy link
Author

Note: It might be necessary to set a min and max cache time to protect against thundering herd on the API if a cookbook update goes out.

@venturaville
Copy link
Author

(::File.ctime(cachepath) - Time.now).abs) > max_cache_time

One method of figuring that out...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant