Skip to content

Commit 00a41fb

Browse files
committed
docs: clarify batch API limitation guidance
Signed-off-by: memleakd <[email protected]>
1 parent 706a170 commit 00a41fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/limitations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ The following are known limitations of the library:
55
1. **Immediate writes (`deferWrites => false`)**: Each setting is written to storage immediately when you call `set()` or `forget()`.
66
The first operation hydrates all settings for that context (1 SELECT query), then each subsequent write performs a separate
77
INSERT or UPDATE. While `DatabaseHandler` and `FileHandler` use an in-memory cache to maintain fast reads, individual write
8-
operations may result in multiple database queries or file writes per request. Use `setMany()` or `forgetMany()` when you
9-
want to explicitly persist multiple settings in one batch operation.
8+
operations may result in multiple database queries or file writes per request. When multiple changes are known ahead of time,
9+
use `setMany()` or `forgetMany()` to group them explicitly and allow supported handlers to persist them more efficiently.
1010

1111
2. **Deferred writes (`deferWrites => true`)**: All settings are batched and written to storage at the end of the request
1212
(during the `post_system` event). This minimizes the number of database queries and file writes, improving performance.

0 commit comments

Comments
 (0)