-
Notifications
You must be signed in to change notification settings - Fork 201
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
[Question] Remove cache for a particular original #53
Comments
Looking at the source there isn't a feature like this. The problem is, cache files don't have any reference to their original file they were created from. This is because the cache-filenames are simple hashes of the filename+parameters. // remove folders from filename
$preparedfilename = str_replace('/','-',$filename);
// generate cachefilename
$cachefilename = $preparedfilename . '_' . md5($parameters); Now a method could do something like this: public function deleteCache($filename)
{
$search = $str_replace('/','-',$filename);
$path = $this->flysystem->listContents('cache-path');
foreach($path as $file)
{
if( some regex) ->delete file
}
} |
Because i'm using a class to generate my configuration arrays instead of using the Request directly, i did a loop over all options and checked if cache exists. If yes, i removed the cache file. I guess another solution would be to maintain a json file maybe ? |
maybe a task at hand could be solved by this pull request: #28? I really have no idea why it hasn't been merged yet. |
Please see issue #7 for more information on this. To keep things organized, we'll continue this discussion there, and I'm going close this issue. @constb the reason that PR wasn't merged in was because:
|
Hello,
I just wanted to know if there's a way to remove the cache for a particular original picture ?
The text was updated successfully, but these errors were encountered: