Home Reference Source
public class | source

CacheLevel

Extends:

* → CacheLevel

A cache implementation using LevelDown

Constructor Summary

Public Constructor
public

constructor(options: object)

Create new Memory cache object

Member Summary

Public Members
public

db: *

Setup the level database

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 db: * source

Setup the level database

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 *