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

Add PSR6 alternative to cache JWKSet #550

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

qdequippe
Copy link
Contributor

@qdequippe qdequippe commented Apr 4, 2024

Q A
Branch?
Bug fix? no
New feature? yes
Deprecations? no
Tickets #537
License MIT

Option to rely on PSR Cache instead of HTTP Cache

See #537 for more details

@qdequippe qdequippe marked this pull request as ready for review April 4, 2024 06:28
Implemented caching in the UrlKeySetFactory to store and retrieve URL data. This is accomplished by adding the PSR Cache package to the composer.json file and incorporating it with the CacheItemPoolInterface in the UrlKeySetFactory class. This addition intends to improve performance by storing data from previous URL requests and reusing them, if available, instead of making repeated URL requests.
@Spomky Spomky force-pushed the psr-cache-url-key-set branch 3 times, most recently from 87feab1 to a4f5158 Compare April 9, 2024 10:19
@Spomky
Copy link
Member

Spomky commented Apr 9, 2024

Hello @qdequippe,

Many thanks for this PR.
I changed your proposal by using the NullAdapter by default to avoid testing the presence of the caching service.
This adapter can be changed with the method enabledCache.
Also, for hasing function is now xxh128 instead of sha1. It is fast, shorter and not broken.

@Spomky Spomky self-assigned this Apr 9, 2024
@Spomky Spomky added this to the 3.4.0 milestone Apr 9, 2024
@Spomky Spomky linked an issue Apr 9, 2024 that may be closed by this pull request
@Spomky Spomky changed the base branch from 3.3.x to 3.4.x April 9, 2024 10:28
@Spomky Spomky merged commit 570052b into web-token:3.4.x Apr 9, 2024
12 checks passed
@qdequippe qdequippe deleted the psr-cache-url-key-set branch April 9, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Option to rely on PSR Cache instead of HTTP Cache
2 participants