Skip to main content

Constants

This item is only intended to be used by the module's authors. Private

Module containing constant values used throughout the Lyra library.

Types

Constants

interface Constants {
RECORD_SCOPE"lyra/records"--

Scope prefix used for keys storing the main DataStoreRecord objects.

TX_SCOPE"lyra/tx"--

Scope prefix used for keys storing transaction status markers in a DataStore.

SHARD_SCOPE"lyra/shards"--

Scope prefix used for keys storing data shards in a DataStore.

LOCK_SCOPE"lyra/locks"--

Scope prefix used for keys storing lock information in a MemoryStore HashMap.

MAX_CHUNK_SIZEnumber--

Maximum size (in bytes) for a single data shard stored in DataStore. Derived from the Roblox DataStore value limit (4MB) minus a reserved amount (INTERNAL_SPACE_RESERVE_BYTES) for Lyra's internal metadata within the main record.

LOCK_REFRESH_INTERVAL_SECONDSnumber--

How often (in seconds) a held lock should be refreshed in MemoryStore to prevent it from expiring while still actively being used. Should be significantly shorter than LOCK_DURATION_SECONDS.

LOCK_DURATION_SECONDSnumber--

The initial time-to-live (TTL) duration (in seconds) for a lock acquired in MemoryStore. If the lock isn't refreshed within this time, it will automatically expire. Must be longer than LOCK_REFRESH_INTERVAL_SECONDS to allow time for refreshes.

AUTOSAVE_INTERVAL_SECONDSnumber--

How often (in seconds) the automatic saving mechanism should attempt to save dirty session data.

}
Show raw api
{
    "functions": [],
    "properties": [],
    "types": [
        {
            "name": "Constants",
            "desc": "",
            "fields": [
                {
                    "name": "RECORD_SCOPE",
                    "lua_type": "\"lyra/records\"",
                    "desc": "Scope prefix used for keys storing the main DataStoreRecord objects."
                },
                {
                    "name": "TX_SCOPE",
                    "lua_type": "\"lyra/tx\"",
                    "desc": "Scope prefix used for keys storing transaction status markers in a DataStore."
                },
                {
                    "name": "SHARD_SCOPE",
                    "lua_type": "\"lyra/shards\"",
                    "desc": "Scope prefix used for keys storing data shards in a DataStore."
                },
                {
                    "name": "LOCK_SCOPE",
                    "lua_type": "\"lyra/locks\"",
                    "desc": "Scope prefix used for keys storing lock information in a MemoryStore HashMap."
                },
                {
                    "name": "MAX_CHUNK_SIZE",
                    "lua_type": "number",
                    "desc": "Maximum size (in bytes) for a single data shard stored in DataStore. Derived from the Roblox DataStore value limit (4MB) minus a reserved amount (INTERNAL_SPACE_RESERVE_BYTES) for Lyra's internal metadata within the main record."
                },
                {
                    "name": "LOCK_REFRESH_INTERVAL_SECONDS",
                    "lua_type": "number",
                    "desc": "How often (in seconds) a held lock should be refreshed in MemoryStore to prevent it from expiring while still actively being used. Should be significantly shorter than LOCK_DURATION_SECONDS."
                },
                {
                    "name": "LOCK_DURATION_SECONDS",
                    "lua_type": "number",
                    "desc": "The initial time-to-live (TTL) duration (in seconds) for a lock acquired in MemoryStore. If the lock isn't refreshed within this time, it will automatically expire. Must be longer than LOCK_REFRESH_INTERVAL_SECONDS to allow time for refreshes."
                },
                {
                    "name": "AUTOSAVE_INTERVAL_SECONDS",
                    "lua_type": "number",
                    "desc": "How often (in seconds) the automatic saving mechanism should attempt to save dirty session data."
                }
            ],
            "source": {
                "line": 33,
                "path": "src/Constants.luau"
            }
        }
    ],
    "name": "Constants",
    "desc": "Module containing constant values used throughout the Lyra library.",
    "private": true,
    "source": {
        "line": 7,
        "path": "src/Constants.luau"
    }
}