Skip to main content
Version: v2

IOpsCachingPolicy Interface

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/odsp-driver-definitions/legacy.

For more information about our API support guarantees, see here.

Signature​

export interface IOpsCachingPolicy

Properties​

PropertyAlertsModifiersTypeDescription
batchSizeBetaoptionalnumberBatch 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
timerGranularityBetaoptionalnumberTo 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
totalOpsToCacheBetaoptionalnumberTotal 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

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

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

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

timerGranularity?: number;

Type: number

totalOpsToCache​

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

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

totalOpsToCache?: number;

Type: number