-
Notifications
You must be signed in to change notification settings - Fork 379
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
Custom cache resolver issue. Default resolver is being called even if custom is specified #265
Comments
To avoid the cache clearing, just set this in your config:
I do this in every project. |
@LouTerrailloune so, this option prevent cache cleaning with default resolver only (and if you have custom clear method implemented it will executes)? Or it disable cache cleaning completely? If last case, it would be good to know how to disable clear cache calling only for default cache resolver. |
I think this will prevent cache clearing completely. The bundled cache clearer service will call all loaded resolver (even if not used), that means If you need to do something special, you can define your own cache clearer service. |
The |
I think the problem is that he is not using I think we should register |
Seems reasonable to me. |
Yes, that was exactly as described. I am using custom cache resolver, extended from web_path one. But after last update I have an error: Did I miss those parameters were removed? What is the analog? |
@svscorp They were removed in 1.0 |
@havvg @LouTerrailloune there is no more no cache and web path resolver defined. You have explicitly add them using config or as a service with tag. |
@makasim Cool, now I need to find out how to specify cache_prefix to store the files in a location different from 'cache/media' (without using custom resolver. There also a change btw, second argument in a service for custom resolver has changed). |
It's very strange. Even specifying:
it continues to store the cached image using filter name in the path. |
There are many BC breaks, not only you mentioned: https://github.com/liip/LiipImagineBundle/blob/master/UPGRADE.md |
@makasim Ok, thanks. Only filter |
It's not possible to get the 'path' option in Resolver, because it's not aware of filter configuration. |
@svscorp may be closed? |
Clear. Removed in 1.0 Discussion: #366 |
Hello
I am writing a custom cache resolver according to the documentation: https://github.com/liip/LiipImagineBundle/blob/master/Resources/doc/cache-resolvers.md
I am storing cropped images in the project/web/images/thumbnails
my config.yml:
liip_imagine:
driver: gmagick
cache: my_custom_cache
cache_prefix: /images/thumbnails
filter_sets:
model_preview_thumbnail:
path: /100x100
quality: 75
filters:
thumbnail: { size: [100, 100], mode: outbound }
And in my custom cache resolver (which is almost copy of WebPathResolver) I do nothing in 'clear' method, because I wont delete my thumbnails.
But when I clearing the cache I experience a problem. My custom resolver executes, and then - default one from the bundle is being called. And it tries to clean 'cache' directory:
The question is this behavior is expected? I expect only specified custom resolver should be called. Is there a way to not call the default one?
The text was updated successfully, but these errors were encountered: