Skip to content

Commit

Permalink
Add removeLeastRecentlyUsedKeys and setRecentKeysLimit to bound m…
Browse files Browse the repository at this point in the history
…ethods
  • Loading branch information
kidroca committed Aug 6, 2021
1 parent 4d74e39 commit aa7a23a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/OnyxCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ class OnyxCache {
*/
this.pendingPromises = {};

// bind all methods to prevent problems with `this`
// bind all public methods to prevent problems with `this`
_.bindAll(
this,
'getAllKeys', 'getValue', 'hasCacheForKey', 'addKey', 'set', 'drop', 'merge',
'hasPendingTask', 'getTaskPromise', 'captureTask',
'hasPendingTask', 'getTaskPromise', 'captureTask', 'removeLeastRecentlyUsedKeys',
'setRecentKeysLimit'
);
}

Expand Down

0 comments on commit aa7a23a

Please sign in to comment.