Skip to content

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

Merged
oanatmaria merged 2 commits intopuppetlabs:mainfrom
BogdanIrimie:FACT-2817
Oct 9, 2020
Merged

(FACT-2817) Only invalidate session cache on clear and reset.#2121
oanatmaria merged 2 commits intopuppetlabs:mainfrom
BogdanIrimie:FACT-2817

Conversation

@BogdanIrimie
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Jenkins please test this on all

@puppetcla
Copy link
Copy Markdown

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
Copy Markdown
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