openhab-addons/bundles/org.openhab.persistence.inmemory
Wouter Born 8672ed0208
Start license headers with /* instead of /** (#18061)
Prevents JavaDoc tooling issues because these tools check comments starting with `/**`.

Signed-off-by: Wouter Born <github@maindrain.net>
2025-01-07 22:33:03 +01:00
..
src Start license headers with /* instead of /** (#18061) 2025-01-07 22:33:03 +01:00
NOTICE
pom.xml Prepare for OH 5.0.0 (#17906) 2024-12-15 20:30:05 +01:00
README.md [inmemory] Default persistence strategy Forecast (#16496) 2024-06-27 08:58:11 +02:00

InMemory Persistence

The InMemory persistence service provides a volatile storage, i.e. it is cleared on shutdown. Because of that the restoreOnStartup strategy is not supported for this service.

The main use-case is to store data that is needed during runtime, e.g. temporary storage of forecast data that is retrieved from a binding.

The default strategy for this service is forecast. Unlike other persistence services, you MUST add a configuration, otherwise no data will be persisted. To avoid excessive memory usage, it is recommended to persist only a limited number of items and use a strategy that stores only data that is actually needed.

The service has a global configuration option maxEntries to limit the number of datapoints per item, the default value is 512. When the number of datapoints is reached and a new value is persisted, the oldest (by timestamp) value will be removed. A maxEntries value of 0 disables automatic purging.