You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hook maintains a simple expiring cache with a fixed max size and keeps a record of recent evaluations based on an optional key-generation function (cacheKeySupplier).
36
36
Be default, the key-generation function is purely based on the flag key.
37
-
Particularly in server use-cases, you may want to take the targetingKey or other contextual information into account in your debouncing:
37
+
Particularly in server use-cases, you may want to take the targetingKey or other contextual information into account in your debouncing.
38
+
Below we see an example using this, as well as other advanced options:
cacheKeySupplier: (_,context)=>context.targetingKey,// we are caching purely based on the targetingKey in the context, so we will only ever cache one entry
0 commit comments