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

(FACT-2817) Only invalidate session cache on clear and reset. #2121

Merged
merged 2 commits into from
Oct 9, 2020

Conversation

BogdanIrimie
Copy link
Contributor

The SessionCache is used internal to store resolver values. If a resolver is called multiple times, we only resolve once the data and all subsequent request to that resolver, will hit the cache.

Problem

The current implementation invalidates this session cache after each request (to_hash, value, []), but Facter 3 invalidates this cache only on reset and clear.

Solution

Invalidate the session cache only on reset and clear

@BogdanIrimie BogdanIrimie added the bug Something isn't working label Oct 6, 2020
@BogdanIrimie BogdanIrimie requested review from a team October 6, 2020 11:54
@BogdanIrimie
Copy link
Contributor Author

Jenkins please test this on all

@puppetcla
Copy link

CLA signed by all contributors.

@BogdanIrimie BogdanIrimie force-pushed the FACT-2817 branch 2 times, most recently from 3d4df32 to caf290c Compare October 8, 2020 06:59
@BogdanIrimie
Copy link
Contributor Author

Jenkins please test this on all

@oanatmaria oanatmaria merged commit 8423373 into puppetlabs:main Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants