Crons
This commit is contained in:
parent
e12379c784
commit
c4fc583369
1 changed files with 8 additions and 0 deletions
|
@ -74,9 +74,13 @@ class PublicController extends BaseController
|
||||||
|
|
||||||
//Resize
|
//Resize
|
||||||
if($size == "small") {
|
if($size == "small") {
|
||||||
|
$start = microtime(true);
|
||||||
$image = ImageResize::createFromString($file);
|
$image = ImageResize::createFromString($file);
|
||||||
$image->resizeToLongSide(self::SIZE_SMALL);
|
$image->resizeToLongSide(self::SIZE_SMALL);
|
||||||
Storage::disk("cache")->put($cacheName."_small", $image->getImageAsString());
|
Storage::disk("cache")->put($cacheName."_small", $image->getImageAsString());
|
||||||
|
$ende = microtime(true);
|
||||||
|
Log::info("Dauer umwandlung: ".($ende-$start));
|
||||||
|
Log::info("Gesamtzeit: ".(microtime(true)-$globalstart));
|
||||||
return Storage::disk('cache')->response($cacheName."_small");
|
return Storage::disk('cache')->response($cacheName."_small");
|
||||||
}
|
}
|
||||||
if($size == "medium") {
|
if($size == "medium") {
|
||||||
|
@ -91,9 +95,13 @@ class PublicController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
if($size == "big") {
|
if($size == "big") {
|
||||||
|
$start = microtime(true);
|
||||||
$image = ImageResize::createFromString($file);
|
$image = ImageResize::createFromString($file);
|
||||||
$image->resizeToLongSide(self::SIZE_BIG);
|
$image->resizeToLongSide(self::SIZE_BIG);
|
||||||
Storage::disk("cache")->put($cacheName."_big", $image->getImageAsString());
|
Storage::disk("cache")->put($cacheName."_big", $image->getImageAsString());
|
||||||
|
$ende = microtime(true);
|
||||||
|
Log::info("Dauer umwandlung: ".($ende-$start));
|
||||||
|
Log::info("Gesamtzeit: ".(microtime(true)-$globalstart));
|
||||||
return Storage::disk('cache')->response($cacheName."_big");
|
return Storage::disk('cache')->response($cacheName."_big");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue