iwyg / jitimage

Just In Time image manipulation (GD, Imagick, imagemagick) with integration for laravel 4
MIT License
95 stars 8 forks source link

Disable cache #36

Closed tomc3 closed 9 years ago

tomc3 commented 10 years ago

Is there any way to disable cache on certain routes, and force to use dynamic processing instead, even in production environment

It will great we can use something like this

example.com/nocache/4/800/600/path/to/image.jpeg

nocache is the routes which is defined in config file for which there is no cache.

No doubt ability to use filter on such will be awesome

iwyg commented 10 years ago

you can always use dynamic routes if no recipes are set, but why would you disable caching?

tomc3 commented 10 years ago

I'm using package on a site which allow users to download different resolution of image, if I cache over 20 different resolution of a image this would blow up my web space.

Rather it will OK to resize image on the request and provide the file.

Yes also there are image for which cache is required, like public gallery

iwyg commented 10 years ago

Then no, it's currently not possible. But I'll note this for the 0.2.x release.

However, you could delete the cached versions of an image after it's been downloaded, but notice that

$cache->delete('source/image.jpg');

would delete all cached versions of that particular source image

Version 0.2.x will be released as beta soon, so please stay tuned :)

iwyg commented 9 years ago

Caches can be disabled for certain paths on version 1.*. Check out develop-branch.