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

Implement caching in the ClientProvider #1

Closed
TwiN opened this issue Jan 3, 2021 · 1 comment · Fixed by #2
Closed

Implement caching in the ClientProvider #1

TwiN opened this issue Jan 3, 2021 · 1 comment · Fixed by #2
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@TwiN
Copy link
Owner

TwiN commented Jan 3, 2021

Implementing a cache with a configurable TTL as well as a configurable maximum size in ClientProvider could be very useful to help preventing unnecessary load on whatever service or infrastructure component ClientProvider's getClientByTokenFunc function is calling.

The implementation:

  • Must be able to have a maximum cache size (e.g. 10000)
  • Must be able to have a configurable TTL (e.g. 1 hour)
  • Must be able to cache invalid tokens with a shorter entry TTL (e.g. 30 minutes)

Being the self-promoting person that I am, I think TwinProduction/gocache would fit this role perfectly.

@TwiN TwiN added enhancement New feature or request good first issue Good for newcomers labels Jan 3, 2021
@ynden
Copy link
Contributor

ynden commented Jan 4, 2021

Hi Chris, I would like to give it a shot.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants