From c02b4841284a1a6c1aa5191fbc2b59b86ce233ed Mon Sep 17 00:00:00 2001 From: shimon Date: Fri, 25 Oct 2024 19:03:07 +0300 Subject: [PATCH] make view api use file cache --- app/config/collections.php | 11 ----------- app/controllers/shared/api.php | 1 + 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 02e9762963..470ee85a5f 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -45,17 +45,6 @@ $commonCollections = [ 'array' => false, 'filters' => [], ], - [ - '$id' => ID::custom('mimeType'), - 'type' => Database::VAR_STRING, - 'format' => '', - 'size' => 255, // https://tools.ietf.org/html/rfc4288#section-4.2 - 'signed' => true, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - ], [ '$id' => ID::custom('headers'), 'type' => Database::VAR_STRING, diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index d212de57ea..d4aca1a9f2 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -735,6 +735,7 @@ App::shutdown() if(!empty($request->getRangeStart())) $keyParams .= '*'.$request->getRangeStart(); if(!empty($request->getRangeEnd())) $keyParams .= '*'.$request->getRangeEnd(); $keyParams .= '*'. APP_CACHE_BUSTER; + var_dump($keyParams); $key = md5($keyParams); $signature = md5($data['payload']); $cacheLog = Authorization::skip(fn () => $dbForProject->getDocument('cache', $key));