Crons
This commit is contained in:
parent
f79851960e
commit
660f621602
1 changed files with 2 additions and 5 deletions
|
@ -51,18 +51,15 @@ class PublicController extends BaseController
|
||||||
//File exists in the right size
|
//File exists in the right size
|
||||||
if (Storage::disk('cache')->exists($cacheName."_".$size)) {
|
if (Storage::disk('cache')->exists($cacheName."_".$size)) {
|
||||||
Log::info("Get from Cache");
|
Log::info("Get from Cache");
|
||||||
|
|
||||||
$this->addAccessLog($tenant->id, $gallery->id, $image->id, "Cache", Storage::disk('cache')->size($cacheName."_".$size));
|
$this->addAccessLog($tenant->id, $gallery->id, $image->id, "Cache", Storage::disk('cache')->size($cacheName."_".$size));
|
||||||
|
Log::info("Return from Cache, Gesamtzeit: ".(microtime(true)-$globalstart));
|
||||||
return Storage::disk('cache')->response($cacheName."_".$size, null, ['Cache-Control'=> 'max-age='.(60*60*24).', public']);
|
return Storage::disk('cache')->response($cacheName."_".$size, null, ['Cache-Control'=> 'max-age='.(60*60*24).', public']);
|
||||||
}
|
}
|
||||||
|
|
||||||
//If File exists in the needed format return
|
//If File exists in the needed format return
|
||||||
$file = null;
|
$file = null;
|
||||||
if (Storage::disk('cache')->exists($cacheName."_".$size)) {
|
if (Storage::disk('cache')->exists($cacheName."_orginal")) {
|
||||||
$file = Storage::disk("cache")->get($cacheName."_orginal");
|
$file = Storage::disk("cache")->get($cacheName."_orginal");
|
||||||
$this->addAccessLog($tenant->id, $gallery->id, $image->id, "Cache", $image->size);
|
|
||||||
Log::info("Return from Cache, Gesamtzeit: ".(microtime(true)-$globalstart));
|
|
||||||
return Storage::disk('cache')->response($cacheName."_".$size);
|
|
||||||
} else {
|
} else {
|
||||||
Log::info("Get from S3");
|
Log::info("Get from S3");
|
||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
|
|
Loading…
Reference in a new issue