[catbox] Update Client.stop to return a promise.

The method is define as async.
9e474ea174/lib/client.js (L40-L43)
This commit is contained in:
Matt R. Wilson 2019-02-19 16:23:30 -07:00
parent a854a18f67
commit cadc6f11fd
No known key found for this signature in database
GPG Key ID: 4457EACA9CCA31C4
2 changed files with 4 additions and 1 deletions

View File

@ -18,6 +18,9 @@ const Memory: EnginePrototypeOrObject = {
const client = new Client<string>(Memory, { partition: 'cache' });
client.start().then(() => {});
client.stop().then(() => {});
const cache = new Policy({
expiresIn: 5000,
}, client, 'cache');

View File

@ -23,7 +23,7 @@ export class Client<T> implements ClientApi<T> {
/** start() - creates a connection to the cache server. Must be called before any other method is available. */
start(): Promise<void>;
/** stop() - terminates the connection to the cache server. */
stop(): void;
stop(): Promise<void>;
/**
* get(key, callback) - retrieve an item from the cache engine if found where:
* * key - a cache key object (see [ICacheKey]).