Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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/sharedStoreAPI. This is a fail-safe way of storing the data.

...