Skip to content

Commit 0ca23de

Browse files
committed
docs: add new max_items option for Memory adapter
This also updates the `ttlPrecision` Signed-off-by: Maximilian Bösing <[email protected]>
1 parent d7ec131 commit 0ca23de

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

docs/book/v4/storage/adapter.md

+8-12
Original file line numberDiff line numberDiff line change
@@ -712,9 +712,9 @@ This adapter implements the following interfaces:
712712
|----------------------|---------------------------------------------------------------------------------|
713713
| `supportedDatatypes` | `string`, `null`, `boolean`, `integer`, `double`, `array`, `object`, `resource` |
714714
| `ttlSupported` | `true` |
715-
| `ttlPrecision` | `0.05` |
715+
| `ttlPrecision` | `1` |
716716
| `usesRequestTime` | `false` |
717-
| `maxKeyLength` | `0` |
717+
| `maxKeyLength` | `0` (unlimited) |
718718
| `namespaceIsPrefix` | `false` |
719719

720720
### Metadata
@@ -725,19 +725,15 @@ This adapter implements the following interfaces:
725725

726726
### Adapter Specific Options
727727

728-
| Name | Data Type | Default Value | Description |
729-
|----------------|---------------|---------------------------------|-----------------------------------------------------------------|
730-
| `memory_limit` | `string\|int` | 50% of `memory_limit` INI value | Limit of how much memory can PHP allocate to allow store items. |
728+
| Name | Data Type | Default Value | Description |
729+
|-------------|-----------|-----------------|-----------------------------------------------------------------------------------------------------|
730+
| `max_items` | `int` | `0` (unlimited) | Limit of how many cache items are allowed to be stored. Available with v3.0 of the `Memory` adapter |
731731

732-
> #### Memory Limit
732+
> #### Max Items
733733
>
734-
> The adapter has the following behavior with regards to the memory limit:
734+
> The adapter has the following behavior in regard to the `max_items` option:
735735
>
736-
> - If the consumed memory exceeds the limit provided, an `OutOfSpaceException`
737-
> is thrown.
738-
> - A number less the or equal to zero disables the memory limit.
739-
> - When a value is provided for the memory limit, the value is measured in
740-
> bytes. Shorthand notation may also be provided.
736+
> - If the items persisted to the memory cache are exceeding the limit, a new item will be stored while an older item will be removed
741737
742738
> ### Current process only
743739
>

0 commit comments

Comments
 (0)