imagecache icon indicating copy to clipboard operation
imagecache copied to clipboard

Default Cache Lifetime

Open Mr-Anonymous opened this issue 7 years ago • 1 comments

Q1) If I use the imagecache, what is the default cache lifetime if no lifetime is mentioned as second parameter like the below code:

$img = Image::cache(function($image) {
   return $image->make('public/foo.jpg')->resize(300, 200)->greyscale();
});

Q2) The documentation said Pass a boolean true as optional third parameter to return an Intervention Image object instead of a image stream.. What does that mean? If I set true as the third parameter, I don't see any changes when viewing the images from my browser, so I don't understand what does it mean by "to return an Intervention Image object instead of a image stream".

Can someone clarify these for me please?

Mr-Anonymous avatar Apr 06 '18 08:04 Mr-Anonymous

Q1) 5 minutes Q2) if true, it returns a instance of a image class that you can call methods and such. If false you get the stream with the image content directly.

guilhermeaiolfi avatar Sep 28 '18 18:09 guilhermeaiolfi