From 137c2d663e58c4bbea703ad7fc37b4dc2b9c9c2c Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Thu, 9 Mar 2023 13:42:43 -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 | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index beaa176249..612af6a89b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -436,6 +436,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 b9b4d19333..3edd6e8643 100644 --- a/app/http.php +++ b/app/http.php @@ -92,7 +92,6 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { $collections = Config::getParam('collections', []); try { - $redis->flushAll(); Console::success('[Setup] - Creating database: appwrite...'); $dbForConsole->create(); } catch (\Exception $e) {