@kwayteow/utils - v0.6.0
Preparing search index...
DeduplicateOptions
Interface DeduplicateOptions<T>
缓存配置选项
interface
DeduplicateOptions
<
T
extends
any
[]
>
{
cacheTime
?:
number
;
keyFields
?:
number
[]
;
keyGenerator
?:
(
...
args
:
T
)
=>
string
;
shouldCache
?:
(
...
args
:
T
)
=>
boolean
;
}
Type Parameters
T
extends
any
[]
Index
Properties
cache
Time?
key
Fields?
key
Generator?
should
Cache?
Properties
Optional
cache
Time
cacheTime
?:
number
缓存结果的时间(毫秒),默认300ms
Optional
key
Fields
keyFields
?:
number
[]
基于特定参数字段生成key的字段索引数组
Optional
key
Generator
keyGenerator
?:
(
...
args
:
T
)
=>
string
自定义缓存key生成器
Optional
should
Cache
shouldCache
?:
(
...
args
:
T
)
=>
boolean
条件缓存:返回false时不使用缓存
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
Properties
cache
Time
key
Fields
key
Generator
should
Cache
@kwayteow/utils - v0.6.0
Loading...
缓存配置选项