From 4ac0ba7df5bd1da3a0f342ba64c61748b476d49f Mon Sep 17 00:00:00 2001 From: Kekskurse Date: Wed, 13 Jan 2021 18:49:40 +0100 Subject: [PATCH] Crons --- app/Http/Controllers/PublicController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index 5826a8a..6be208a 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -39,6 +39,8 @@ class PublicController extends BaseController } public function returnImageFile($tenant, $gallery, $image, Request $request) { + $uid = uniqid(); + Log::info($uid.": Start"); $globalstart = microtime(true); $tenant = Tenant::query()->where("url", "=", $tenant)->firstOrFail(); $gallery = Gallery::getByTenantAndUrl($tenant->id, $gallery); @@ -51,7 +53,7 @@ class PublicController extends BaseController //File exists in the right size if (Storage::disk('cache')->exists($cacheName."_".$size)) { $this->addAccessLog($tenant->id, $gallery->id, $image->id, "Cache", Storage::disk('cache')->size($cacheName."_".$size)); - Log::info("Return ".$size." from Cache, Gesamtzeit: ".(microtime(true)-$globalstart)); + Log::info($uid.": Return ".$size." from Cache, Gesamtzeit: ".(microtime(true)-$globalstart)); return Storage::disk('cache')->response($cacheName."_".$size, null, ['Cache-Control'=> 'max-age='.(60*60*24).', public']); }