{"action":"created","issue":{"url":"https://api.github.com/repos/onevcat/Kingfisher/issues/471","repository_url":"https://api.github.com/repos/onevcat/Kingfisher","labels_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/471/labels{/name}","comments_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/471/comments","events_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/471/events","html_url":"https://github.com/onevcat/Kingfisher/issues/471","id":181308549,"number":471,"title":"Problems with cache and custom image processor","user":{"login":"AlbertoGuerreroMartin","id":5872411,"avatar_url":"https://avatars.githubusercontent.com/u/5872411?v=3","gravatar_id":"","url":"https://api.github.com/users/AlbertoGuerreroMartin","html_url":"https://github.com/AlbertoGuerreroMartin","followers_url":"https://api.github.com/users/AlbertoGuerreroMartin/followers","following_url":"https://api.github.com/users/AlbertoGuerreroMartin/following{/other_user}","gists_url":"https://api.github.com/users/AlbertoGuerreroMartin/gists{/gist_id}","starred_url":"https://api.github.com/users/AlbertoGuerreroMartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlbertoGuerreroMartin/subscriptions","organizations_url":"https://api.github.com/users/AlbertoGuerreroMartin/orgs","repos_url":"https://api.github.com/users/AlbertoGuerreroMartin/repos","events_url":"https://api.github.com/users/AlbertoGuerreroMartin/events{/privacy}","received_events_url":"https://api.github.com/users/AlbertoGuerreroMartin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-06T02:07:51Z","updated_at":"2016-10-06T04:23:00Z","closed_at":null,"body":"I have implemented a custom ImageProcessor for applying a grayscale filter when downloading images with Kingfisher, and I'm using it on a tableview's cells (one image per cell).\r\n\r\nThe problem that I've found is that, while I was developing the filter, Kingfisher cached the images without applying the processor. In an attempt to surround this (at least while developing), I added a  bar button item for clearing the image cache whenever I want.\r\nBut the cache is not been cleared. Kingfisher always fetches previously cached images without the filter applied, and it doesn't even call the \"process\" method of my custom processor (it's just being ignored).\r\nFor clearing the cache, I've tried both:\r\n`KingfisherManager.shared.cache.clearDiskCache()`\r\n`KingfisherManager.shared.cache.clearMemoryCache()`\r\n\r\nThe only way I've found for clearing the cache successfully is to add the **.forceRefresh** option when calling to kf_setImage, but of course I don't want Kingfisher to ignore the cache every time I scroll the tableview (in fact, it would destroy the cache system).\r\n\r\n¿Am I doing something wrong? ¿Could it be an issue on ImageProcessor or ImageCache?"},"comment":{"url":"https://api.github.com/repos/onevcat/Kingfisher/issues/comments/251863819","html_url":"https://github.com/onevcat/Kingfisher/issues/471#issuecomment-251863819","issue_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/471","id":251863819,"user":{"login":"onevcat","id":1019875,"avatar_url":"https://avatars.githubusercontent.com/u/1019875?v=3","gravatar_id":"","url":"https://api.github.com/users/onevcat","html_url":"https://github.com/onevcat","followers_url":"https://api.github.com/users/onevcat/followers","following_url":"https://api.github.com/users/onevcat/following{/other_user}","gists_url":"https://api.github.com/users/onevcat/gists{/gist_id}","starred_url":"https://api.github.com/users/onevcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onevcat/subscriptions","organizations_url":"https://api.github.com/users/onevcat/orgs","repos_url":"https://api.github.com/users/onevcat/repos","events_url":"https://api.github.com/users/onevcat/events{/privacy}","received_events_url":"https://api.github.com/users/onevcat/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T04:23:00Z","updated_at":"2016-10-06T04:23:00Z","body":"May I know how did you set the image with processor?\r\n\r\nIf you are using the image view extension, Kingfisher will send the processed image to cache by default, so it is intended that the processor method not being called again when retrieving data from cache, since the data should already be precessed before being stored.\r\n"}}
{"actor":{"display_login":"onevcat"}}