Crons
This commit is contained in:
parent
4ac0ba7df5
commit
0577550b2a
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ class PublicController extends BaseController
|
||||||
|
|
||||||
public function returnImageFile($tenant, $gallery, $image, Request $request) {
|
public function returnImageFile($tenant, $gallery, $image, Request $request) {
|
||||||
$uid = uniqid();
|
$uid = uniqid();
|
||||||
Log::info($uid.": Start");
|
Log::info($uid.": Start", [$image]);
|
||||||
$globalstart = microtime(true);
|
$globalstart = microtime(true);
|
||||||
$tenant = Tenant::query()->where("url", "=", $tenant)->firstOrFail();
|
$tenant = Tenant::query()->where("url", "=", $tenant)->firstOrFail();
|
||||||
$gallery = Gallery::getByTenantAndUrl($tenant->id, $gallery);
|
$gallery = Gallery::getByTenantAndUrl($tenant->id, $gallery);
|
||||||
|
@ -53,7 +53,7 @@ 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)) {
|
||||||
$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($uid.": Return ".$size." from Cache, Gesamtzeit: ".(microtime(true)-$globalstart));
|
Log::info($uid.": Return ".$size." from Cache, Gesamtzeit: ".(microtime(true)-$globalstart), [$image->id]);
|
||||||
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']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue