This section describes some good-to-know information related to objects used by Functionsby Usage Engine Functions.
Store vs State
The Script Function provides different ways of state management. Two popular options are by interacting with the Store
store
and State
state
API.
Use state
during execution for high-performance in-memory storage and use store
when the data should be persisted.
When dealing with persistence within a Script Function, a common approach is to use store
/sharedStore
API. This is a fail-safe way of storing the data.
...