From 7ab490ab6862d5156ba032d1e3ff54689babb4a6 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Thu, 9 Mar 2023 14:11:21 -0800 Subject: [PATCH] Prevent cache from being flushed on start We shouldn't clear the cache because scheduled functions are also in the cache, and we don't want to lose them. --- CONTRIBUTING.md | 8 ++++++++ app/http.php | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f4419eadaa..5e0055737f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -434,6 +434,14 @@ composer lint composer lint ``` +## Clearing the Cache + +If you need to clear the cache, you can do so by running the following command: + +```bash +docker compose exec redis redis-cli FLUSHALL +``` + ## Tutorials From time to time, our team will add tutorials that will help contributors find their way in the Appwrite source code. Below is a list of currently available tutorials: diff --git a/app/http.php b/app/http.php index f5429c8664..b1ed21b8d1 100644 --- a/app/http.php +++ b/app/http.php @@ -89,8 +89,6 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { $collections = Config::getParam('collections', []); try { - $cache = $app->getResource('cache'); /** @var Utopia\Cache\Cache $cache */ - $cache->flush(); Console::success('[Setup] - Creating database: appwrite...'); $dbForConsole->create(); } catch (\Exception $e) {