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

[Documentation] How to use the built-in cache? #409

Open
1 of 5 tasks
Logankwb opened this issue Apr 12, 2023 · 0 comments
Open
1 of 5 tasks

[Documentation] How to use the built-in cache? #409

Logankwb opened this issue Apr 12, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@Logankwb
Copy link

Logankwb commented Apr 12, 2023

Documentation related to component

Cache

Please check all that apply

  • typo
  • documentation doesn't exist
  • documentation needs clarification
  • error(s) in the example
  • needs an example

Description of the issue

The README says Utilizing the cache is optional, but we would highly recommend it. As a user of this library, I read this as there's a default cache that one would opt-in to with the WithCache() option - perhaps with cache.Default being the default implementation.

With there not being any obvious default implementation to refer to when adding the WithCache() option, I then assume that the default cache is enabled by default. But then how would one opt out?

Following the code a little, it looks like if no cache is specified, then the noopCacheAccessor{} is used, which doesn't appear to cache anything

https://github.com/AzureAD/microsoft-authentication-library-for-go/blob/dev/apps/internal/base/base.go#L219

Is there an actual implementation that gets used with WithCache isn't specified? And if we do need to with WithCache, how do we use the built-in implementation?

@Logankwb Logankwb added the documentation Improvements or additions to documentation label Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant