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 LRU cache for HTTP response caching #105

Merged
merged 1 commit into from
May 31, 2023

Conversation

hsnodgrass
Copy link
Contributor

This commit adds a new class, PuppetForge::LruCache, that is used by PuppetForge::V3::Base to cache HTTP get responses that are returned in the PuppetForge::V3::Base#request method. This should ensure that most HTTP requests are locally cached and should improve performance and reduce load on the upstream servers. The maximum cache size defaults to 30, however it is configurable using the environment variable PUPPET_FORGE_MAX_CACHE_SIZE.

@CLAassistant
Copy link

CLAassistant commented May 4, 2023

CLA assistant check
All committers have signed the CLA.

This commit adds a new class, PuppetForge::LruCache, that is used
by PuppetForge::V3::Base to cache HTTP get responses that are
returned in the PuppetForge::V3::Base#request method. This should
ensure that most HTTP requests are locally cached and should improve
performance and reduce load on the upstream servers. The maximum
cache size defaults to 30, however it is configurable using the
environment variable PUPPET_FORGE_MAX_CACHE_SIZE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants