Star ✨ on GitHub

Memory Database

A volatile, in-memory storage provider for Moonlink.js. Data is lost when the process restarts.

The Memory database provider is a simple, non-persistent storage implementation. It conforms to the database interface but performs no actual storage operations, effectively acting as a "no-op" or ephemeral cache. It is the default if no database is configured.

Methods

init(manager, options)

init(manager, options)#

Initializes the memory provider (No-op).

managerManager required

The Moonlink Manager instance.

optionsobject

Optional configuration.

get(key)

get(key)#

Always returns undefined as this provider does not persist data.

keystring required

The key to retrieve.

set(key, value)

set(key, value)#

No-op. Does not store the value.

keystring required

The key to store.

valueany required

The value to store.

has(key)

has(key)#

Always returns false.

keystring required

The key to check.

remove(key)

remove(key)#

Always returns false.

keystring required

The key to remove.

keys(pattern)

keys(pattern)#

Always returns an empty array.

patternstring

Optional pattern.

clear()

clear()#

No-op.

shutdown()

shutdown()#

No-op.