From aa7a23a0e67e0d94fc4eaeb1fc792cdae4f63936 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Fri, 6 Aug 2021 14:46:51 +0300 Subject: [PATCH] Add `removeLeastRecentlyUsedKeys` and `setRecentKeysLimit` to bound methods --- lib/OnyxCache.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/OnyxCache.js b/lib/OnyxCache.js index 83876e17..530e3ec1 100644 --- a/lib/OnyxCache.js +++ b/lib/OnyxCache.js @@ -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' ); }