Repository navigation
Allow caching Flysystem resolver lookups - #1663
ousamabenyounes wants to merge 2 commits into
Conversation
|
does wrapping the psr cache resolver around the flysystem resolver not work? https://symfony.com/bundles/LiipImagineBundle/current/cache-resolver/psr_cache.html - the example wraps an S3 resolver, but if i am not mistaken, you can wrap any resolver with the cache resolver |
|
Yes—the PR reuses |
dbu
left a comment
There was a problem hiding this comment.
thanks for the explanation.
as the cache resolver is a generic concept, i don't like that the configuration in this pull request is specific to one resolver. if we want to add something that saves the user the effort of defining their own service, i think it should be a generic solution to cache any resolver.
| arguments: ["%kernel.cache_dir%/flysystem"] | ||
| test.flysystem: | ||
| class: League\Flysystem\Filesystem | ||
| arguments: ['@test.flysystem.adapter'] |
There was a problem hiding this comment.
do we need all these suddenly?
This adds an optional
cacheservice ID to Flysystem resolver configuration. When configured, the factory keeps the Flysystem resolver as the inner service and exposes a PSR-6-cached resolver under the configured resolver name, matching the existing cache-decoration pattern used by the S3 resolver.The Flysystem resolver documentation and 3.x changelog now describe the option.
Test verification (RED → GREEN)
On unmodified
origin/3.xwith the new functional configuration and regression test:With the implementation:
Full local replay compared with
origin/3.x: