Home Reference Source
public class | source

CacheMemory

Extends:

* → CacheMemory

A basic in-memory cache implementation

Constructor Summary

Public Constructor
public

constructor(options: object)

Create new Memory cache object

Member Summary

Public Members
public

cache: {}

Create a new object for caching

Method Summary

Private Methods
private

async _del(key: *)

private

async _get(key: *): *

private

async _getKeys(prefix: *): *

private

async _set(key: *, object: *)

Public Constructors

public constructor(options: object) source

Create new Memory cache object

Params:

NameTypeAttributeDescription
options object

Public Members

public cache: {} source

Create a new object for caching

Private Methods

private async _del(key: *) source

Params:

NameTypeAttributeDescription
key *

private async _get(key: *): * source

Params:

NameTypeAttributeDescription
key *

Return:

*

private async _getKeys(prefix: *): * source

Params:

NameTypeAttributeDescription
prefix *

Return:

*

private async _set(key: *, object: *) source

Params:

NameTypeAttributeDescription
key *
object *