{"action":"closed","issue":{"url":"https://api.github.com/repos/liip/LiipImagineBundle/issues/571","labels_url":"https://api.github.com/repos/liip/LiipImagineBundle/issues/571/labels{/name}","comments_url":"https://api.github.com/repos/liip/LiipImagineBundle/issues/571/comments","events_url":"https://api.github.com/repos/liip/LiipImagineBundle/issues/571/events","html_url":"https://github.com/liip/LiipImagineBundle/issues/571","id":61807299,"number":571,"title":"Cache invalidation when using \"runtime config\" example","user":{"login":"joshribakoff","id":4021306,"avatar_url":"https://avatars.githubusercontent.com/u/4021306?v=3","gravatar_id":"","url":"https://api.github.com/users/joshribakoff","html_url":"https://github.com/joshribakoff","followers_url":"https://api.github.com/users/joshribakoff/followers","following_url":"https://api.github.com/users/joshribakoff/following{/other_user}","gists_url":"https://api.github.com/users/joshribakoff/gists{/gist_id}","starred_url":"https://api.github.com/users/joshribakoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshribakoff/subscriptions","organizations_url":"https://api.github.com/users/joshribakoff/orgs","repos_url":"https://api.github.com/users/joshribakoff/repos","events_url":"https://api.github.com/users/joshribakoff/events{/privacy}","received_events_url":"https://api.github.com/users/joshribakoff/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-15T12:48:33Z","updated_at":"2015-12-28T07:45:06Z","closed_at":"2015-12-28T07:45:06Z","body":"In your readme, you show how to set the runtime config... I'd like to use 1 filter called \"my_thumb\", and then just code the widths & heights into each Twig call. The reason being is that I think the designer who edits the Twig files should be the one who sets the widths & heights. The overhead of setting up a named filter each time is undesirable to me.\r\n\r\nHere's your example:\r\n```\r\n{% set runtimeConfig = {\"thumbnail\": {\"size\": [50, 50] }} %}\r\n<img src=\"{{ '/relative/path/to/image.jpg' | imagine_filter('my_thumb', runtimeConfig) }}\" />\r\n```\r\n\r\nI am then doing this when I wish to invalidate the cache:\r\n```\r\n$cm = $this->getContainer()->get('liip_imagine.cache.manager');\r\n$cm->remove('/relative/path/to/image.jpg');\r\n```\r\n\r\nNormally the files are cached to \"cache/my_thumb\". However, when passing the runtime config they are not cached there - they are instead cache into a folder \"rc\" with subfolders that appear to be some sort of hash.\r\n\r\nWhen I ask the cache manager to invalidate caches for my source file, it only clears \"cache/my_thumb\" & it is not clearing any cache files that were created with a custom \"runtime config\" & cached to the \"rc\" folder.\r\n\r\nWouldn't it be simpler if you just looked at the modification time/hash of my original image, and invalidate it for me? I don't even desire to do explicit cache invalidation. Your docs for the cache invalidation are unclear to me. You do not show examples, and it leave users confused as to what they should pass for the value of the `$path` parameter. As it stands I have no idea how to clear the cache for any files with a \"runtime configuration\" & I am not finding any help via the documentation.\r\n\r\nFurthermore, it should be easier for me to purge my own cache files outside of this library. Due to your choice to store the folder name as a hash, I'm unclear how to do that. I'd suggest the folder to be named \"rc/50x50\" rather than \"rc/{some_random_hash}\" - that would improve the library by allowing it to \"get out of the way\" when needed, if that makes sense."}}