-
-
Notifications
You must be signed in to change notification settings - Fork 861
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 Souin as available provider to the existing system #4540
Add Souin as available provider to the existing system #4540
Conversation
note that the ci is broken we're trying to fix underlying issues |
src/Core/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php
Outdated
Show resolved
Hide resolved
tests/Core/Bridge/Symfony/Bundle/DependencyInjection/ConfigurationTest.php
Outdated
Show resolved
Hide resolved
The tests on the main branch break the PHPUnit ones on PRs. Due to the bb2180f commit. |
@soyuka I reverted the Cache-Tag into Cache-Tags. Can you re-review for the last time? |
Hi there, what about this? |
Hey, is there a Chance this feature will be in 2.7 ? |
I don't think because they never answered 🙃 |
We're focus on releasing API Platform 3 (which is in beta). We'll review this PR as well as other new features when API Platform 3 will be tagged. |
Ready to review/merge. |
src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php
Outdated
Show resolved
Hide resolved
Can I have a last review please? |
$definitions[] = $definition; | ||
} | ||
$serviceName = $config['http_cache']['invalidation']['purger']; | ||
switch ($serviceName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we prefer match
now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The switch case allows us to use varnish by default.
Nice! A few comments lefts but we're almost good to merge imo! Thanks @darkweak sorry for the delays! |
@soyuka note this discussion: darkweak/souin#277 (comment) It seems Souin will start passing any request as soon as the Authorization header (or Cookie) is present in the request, it doesn't provide (nor plans to provide) any sort of "user context"-like feature FOS HTTP Cache bundle, which IIRC APIP relied on before. |
Ready for the merge @soyuka |
Well, then there is no reason that souin should be integrated into APP. offtopic: @darkweak would like to consider changing the souin logic? Thanks! |
@divine note this PR darkweak/souin#283 Anyway, TBH the api platform team won't merge this PR I guess. |
merci @darkweak |
I cherry-picked it in my PR just to be a bit less provider specific. souin will have native support from API Platform 3.1 (coming out mid-January) you can try it using dev-main for now. |
Add Souin as an available purger provider instead of the Varnish one to be able to use natively Souin as a cache system inside the Caddy reverse-proxy and refactor the AddTagsListener to be able to customise the HTTP header tag and the separator instead of the forced Cache-Tag from Cloudflare.