Intervention / imagecache

Caching extension for the Intervention Image Class

Home Page:https://image.intervention.io/v2/usage/cache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Refresh" cache when the Template Image class changes.

Luddinus opened this issue · comments

Hi,

I have this in my imagecache.php config

'templates' => [
        'small' => 'Intervention\Image\Templates\Small',
        'medium' => 'Intervention\Image\Templates\Medium',
        'large' => 'Intervention\Image\Templates\Large',

        'avatar' => 'App\ImageCaches\Avatar'
    ],
class Avatar implements FilterInterface
{
    public function applyFilter(Image $image)
    {
        return $image->fit(256, 256);
    }
}

So the first time works well, BUT if I change the "fit" parameters, it will load the previous ones.

How can I "refresh" the cache and get the new thumbnails?

Thx.

You have to clear the cache. For example: php artisan cache:clear