LiipImagineBundle
LiipImagineBundle copied to clipboard
Possible to dynamically define cache directory?
How would I go about setting up a dynamic cache directory? e.g.
resolvers:
media_cache:
flysystem:
filesystem_service: oneup_flysystem.media_filesystem
cache_prefix: '_cache/<INSERT DYNAMIC VALUE HERE>'
Is there a service I can override perhaps?
Thanks
is the prefix you need so dynamic that you can not determine the value when symfony cache is built, and you also can't use a system environment variable? that would be doable with normal symfony configuration features.
as this is referencing a flysystem service name, you could write a flysystem adapter that decorates the filesystem adapater of flysystem and adds the dynamic prefix to all paths. the path would then be handled inside the flysystem adapter and liip imagine would not need to be aware of it. would that work?