Skip to main content
Version: v1

IOpsCachingPolicy Interface

Signature

export interface IOpsCachingPolicy

Properties

Property Modifiers Type Description
batchSize optional number Batch size. Controls how many ops are grouped together as single cache entry The bigger the number, the more efficient it is (less reads & writes) At the same time, big number means we wait for so many ops to accumulate, which increases chances and number of trailing ops that would not be flushed to cache when user closes tab Use any number below 1 to disable caching Default: 100
timerGranularity optional number To reduce the problem of losing trailing ops when using big batch sizes, host could specify how often driver should flush ops it has not flushed yet. -1 means do not use timer. Measured in ms. Default: 5000
totalOpsToCache optional number Total number of ops to cache. When we reach that number, ops caching stops Default: 5000

Property Details

batchSize

Batch size. Controls how many ops are grouped together as single cache entry The bigger the number, the more efficient it is (less reads & writes) At the same time, big number means we wait for so many ops to accumulate, which increases chances and number of trailing ops that would not be flushed to cache when user closes tab Use any number below 1 to disable caching Default: 100

Signature

batchSize?: number;

Type: number

timerGranularity

To reduce the problem of losing trailing ops when using big batch sizes, host could specify how often driver should flush ops it has not flushed yet. -1 means do not use timer. Measured in ms. Default: 5000

Signature

timerGranularity?: number;

Type: number

totalOpsToCache

Total number of ops to cache. When we reach that number, ops caching stops Default: 5000

Signature

totalOpsToCache?: number;

Type: number