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.