Add cache configuration for Flysystem resolvers
It would be nice if the Flysystem resolver supported a cache configuration to simplify cached lookups when using Flysystem adapters. For one of our clients, we effectively have to build these services ourselves in our application and configure the loaders to use these manually defined services instead of the bundle handling this natively.
We're using the AsyncAws package and its Flysystem adapter for a client using AWS S3 as their storage backend and we use the PsrCacheResolver to cache the resolved URLs to avoid the API calls that the adapter makes when the cache manager's resolve() method is triggered, allowing us to store these resolved URLs in the cache for slightly improved performance.
does flysystem not have cache adapters itself that could be used for this? or does the cache need to be specific to liip imagine bundle?
Flysystem v1 had cache decorators but the newer versions don't.
The idea was kind of brought on by looking at the S3 resolver factory and seeing how it has configuration options to automatically decorate the resolver with a cache layer. So instead of needing to manually configure the services like https://symfony.com/bundles/LiipImagineBundle/current/cache-resolver/psr_cache.html recommends it could be simplified through the resolver configuration and the bundle automatically handle that extra bit of service config.