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

Fix uncache option for list rules and categories #3

Merged
merged 2 commits into from
Sep 27, 2024
Merged

Conversation

emcfarlane
Copy link
Contributor

Ensures when ClientWithCacheRulesAndCategories option is not supplied the default uncached behaviour is respected. Each invocation of ListRules or ListCatorgies by default should not be cached.

Ensures when ClientWithCacheRulesAndCategories option is not supplied
the default uncached behaviour is respected. Each invocation of
ListRules or ListCatorgies by default should not be cached.
// Storing a bool to not deal with generic zero/nil comparisons.
called bool
lock sync.RWMutex
once sync.Once
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change. The singleton can be written as a once.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted.

@emcfarlane emcfarlane merged commit 4309c40 into main Sep 27, 2024
4 checks passed
@emcfarlane emcfarlane deleted the ed/obeyCache branch September 27, 2024 19:30
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

Successfully merging this pull request may close these issues.

2 participants