Creates a new instance of the MemoryStorage class.
An optional initial memory store to seed the storage with data
Deletes storage items from memory.
The keys of the items to delete
A promise that resolves when the delete operation is complete
Reads storage items from memory.
The keys of the items to read
A promise that resolves to the read items
Writes storage items to memory.
The items to write, indexed by key
A promise that resolves when the write operation is complete
StaticgetGets a single shared instance of the MemoryStorage class.
The singleton instance of MemoryStorage
A simple in-memory storage provider that implements the Storage interface.
Remarks
This class provides a volatile storage solution that keeps data in memory, which means data is lost when the process terminates. It's primarily useful for:
MemoryStorage supports optimistic concurrency control through eTags and can be used as a singleton through the getSingleInstance() method to share state across different parts of an application.