imagecache icon indicating copy to clipboard operation
imagecache copied to clipboard

Image cache wont update/clear when image updated with same name

Open yelnyafacee opened this issue 7 years ago • 3 comments

When I updated an existing image ( for example : bacon-broccoli-egg-bites2.png ) with a new image file with same name (bacon-broccoli-egg-bites2.png), the cached image manipulation http://localhost/testsite/public/image/300/300/c/images/food/2/bacon-broccoli-egg-bites2.png ) wont update most of the time, when I visit the above URL, I get the old image, how do I fix this?

yelnyafacee avatar Nov 12 '18 08:11 yelnyafacee

I am using file as cache driver

yelnyafacee avatar Nov 12 '18 08:11 yelnyafacee

Same problem here, I have an image with routed cache enabled. Later I rotate the image, but cache will not update. How I can reset/regenerate cache for the specified image?

catalin87 avatar Mar 08 '19 08:03 catalin87

I have read some insights about this issue, heres what i did

`$imageCacheTemplates = collect(config("imagecache.templates"));

        foreach ($imageCacheTemplates as $key => $template) {
            $image = $imageCache->make(storage_path("app")."/". config("quepisos.uploadsDir").$result)->filter(new $template);
            Cache::forget($image->checksum());
        }`

rush4u avatar Jan 29 '20 14:01 rush4u