Skip to content

db

Description

Persistent storage that lets you store values between reloads


flush

db.flush()

Flushes the database to disk. This is automatically called when the script is reloaded, but you can call it manually if you want to force a flush.

read

db.read(key_name)

Gets a value from the database.

write

db.write(key_name, value)

Writes a value to the database. Avoid calling this often. For example, call read at script load, then call write during the ‘shutdown’ event