Skip to content

Documentation / @tenancy-node/cache-memcached / MemcachedCacheStore

Class: MemcachedCacheStore ​

Defined in: index.ts:35

Caché en Memcached. Memcached no permite borrar por prefijo, así que cada tenant tiene un número de versión dentro de sus llaves: flushTenant la incrementa y lo anterior queda inalcanzable (y vence solo).

Implements ​

Constructors ​

Constructor ​

new MemcachedCacheStore(options?): MemcachedCacheStore

Defined in: index.ts:41

Parameters ​

options? ​

MemcachedOptions = {}

Returns ​

MemcachedCacheStore

Properties ​

client ​

readonly client: Client

Defined in: index.ts:36

Methods ​

close() ​

close(): Promise<void>

Defined in: index.ts:101

Returns ​

Promise<void>

Implementation of ​

CacheStore.close


delete() ​

delete(key): Promise<void>

Defined in: index.ts:87

Parameters ​

key ​

string

Returns ​

Promise<void>

Implementation of ​

CacheStore.delete


flushTenant() ​

flushTenant(tenantId): Promise<void>

Defined in: index.ts:91

Borra todas las llaves del tenant (las que empiezan con tenant:{id}:).

Parameters ​

tenantId ​

string

Returns ​

Promise<void>

Implementation of ​

CacheStore.flushTenant


get() ​

get<T>(key): Promise<T | undefined>

Defined in: index.ts:77

Type Parameters ​

T ​

T = unknown

Parameters ​

key ​

string

Returns ​

Promise<T | undefined>

Implementation of ​

CacheStore.get


ping() ​

ping(): Promise<void>

Defined in: index.ts:96

Returns ​

Promise<void>

Implementation of ​

CacheStore.ping


set() ​

set(key, value, ttlSeconds?): Promise<void>

Defined in: index.ts:82

Parameters ​

key ​

string

value ​

unknown

ttlSeconds? ​

number

Returns ​

Promise<void>

Implementation of ​

CacheStore.set

Publicado bajo la licencia MIT.