From 36e4c8c399c3c61a5ea03a14ad9854b466f68e3e Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 10 Oct 2024 12:53:45 +0300 Subject: [PATCH] debug --- app/controllers/shared/api.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 8ddb9c61f7..952ab8b49e 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -471,6 +471,7 @@ App::init() $timestamp = 60 * 60 * 24 * 30; $data = $cache->load($key, $timestamp); if (!empty($data) && !$cacheLog->isEmpty()) { + $timerStart = \microtime(true); $parts = explode('/', $cacheLog->getAttribute('resourceType')); $type = $parts[0] ?? null; @@ -506,7 +507,8 @@ App::init() throw new Exception(Exception::STORAGE_FILE_NOT_FOUND); } } - + $timerEnd= \microtime(true); + var_dump('Timer: ' . $timerEnd - $timerStart); $response ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + $timestamp) . ' GMT') ->addHeader('X-Appwrite-Cache', 'hit')