From a7594799c76b2c3576a621a201d9ec566f5319e5 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 14 Nov 2024 17:37:16 +0000 Subject: [PATCH] Improve docs --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 769c337..ad0d643 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,8 @@ If non-zero, all array elements fetched from the database will be stored in an i All elements written to the array by the application will also be stored in an in-memory *write cache*, and flushed to the database every `cacheTtl` seconds. +The cache is also flushed on shutdown by deferring an event loop callback, so make sure `EventLoop::run();` is being used to run the application, to make sure all data is flushed correctly (alternatively, `saveDbProperties` can be used to manually flush the cache on shutdown when using automatic properties, and `flushCache` in manual mode). + If the array has an [object value type (ValueType::OBJECT)](#key-and-value-types), write caching is disabled. If `cacheTtl` is 0, read and write caching is disabled.