Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching #3

Open
pschichtel opened this issue Jun 15, 2018 · 2 comments
Open

Add caching #3

pschichtel opened this issue Jun 15, 2018 · 2 comments

Comments

@pschichtel
Copy link
Owner

This is especially useful for the hiera/data use-case, where there may be a lot of lookup calls which currently will all lead to completely rebuild of the same model over and over again.
The caching could be as simple as as writing out the resulting file and passing it through if it exists. The obvious cache-key is the node.

@pschichtel
Copy link
Owner Author

Caching would be enabled by simply providing a directory to save the cached models to. Additionally there could be an environment variable to force a cache-bypass, which could be useful to temporarily disable caching during environment deployments for consistency reasons.

@pschichtel
Copy link
Owner Author

pschichtel commented Jun 15, 2018

Use this to deliver a file from cache: https://github.com/tokuhirom/golang-samples/blob/master/samples/coreutils/cat.go

...obviously combined with some locking

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

No branches or pull requests

1 participant