store
Exposes namespaced Key-Value Stores you can access inside of your Jobs.
Only use this for small values - there’s a 256KB size limit per item.
Namespaces
store.env
to access and store data within the Environmentstore.job
to access and store data within the Jobstore.run
to access and store data within the Run
You will only be able to access Run-scoped data from inside the same Run when using store.run
.
To share data across Runs you can use store.job
:
And to share data across Jobs you can use store.env
instead:
Methods
delete()
Deletes an item from the Key-Value Store.
Should be a stable and unique cache key inside the run()
. See
resumability for more information.
The key
of the item to delete.
Returns
A Promise
that resolves when the item has been deleted.
has()
Checks if an item exists in the Key-Value Store.
Should be a stable and unique cache key inside the run()
. See
resumability for more information.
The key
of the item to check existence of.
Returns
A Promise
that resolves to a boolean
value indicating existence.
get()
Retrieves an item from the Key-Value Store.
Should be a stable and unique cache key inside the run()
. See
resumability for more information.
The key
of the item to retrieve.
Returns
A Promise
that resolves to the stored value or undefined
if missing.
set()
Stores an item in the Key-Value Store.
Should be a stable and unique cache key inside the run()
. See
resumability for more information.
The key
of the item to store.
The serializable value
to store.
Returns
A Promise
that resolves to the stored value.
Was this page helpful?