Skip to content

Commit

Permalink
Fix key expiration issues with Groups+Clustering
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Grondin committed Dec 1, 2018
1 parent f32b02c commit 1a1bd62
Show file tree
Hide file tree
Showing 17 changed files with 509 additions and 229 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ __deleteKey()__

* `str`: The key for the limiter to delete.

Manually deletes the limiter at the specified key. This can be useful when the auto cleanup is turned off.
Manually deletes the limiter at the specified key. When using Clustering, the Redis data is immediately deleted and the other Groups in the Cluster will eventually delete their local key automatically, unless it is still being used.

__keys()__

Expand Down
5 changes: 3 additions & 2 deletions bottleneck.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,11 @@ declare module "bottleneck" {
updateSettings(options: Bottleneck.ConstructorOptions): void;

/**
* Deletes the limiter for the given key
* Deletes the limiter for the given key.
* Returns true if a key was deleted.
* @param str - The key
*/
deleteKey(str: string): Promise<void>;
deleteKey(str: string): Promise<boolean>;

/**
* Disconnects the underlying redis clients, unless the Group was created with the `connection` option.
Expand Down
5 changes: 3 additions & 2 deletions bottleneck.d.ts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,11 @@ declare module "bottleneck" {
updateSettings(options: Bottleneck.ConstructorOptions): void;

/**
* Deletes the limiter for the given key
* Deletes the limiter for the given key.
* Returns true if a key was deleted.
* @param str - The key
*/
deleteKey(str: string): Promise<void>;
deleteKey(str: string): Promise<boolean>;

/**
* Disconnects the underlying redis clients, unless the Group was created with the `connection` option.
Expand Down
Loading

0 comments on commit 1a1bd62

Please sign in to comment.