Skip to main content

WithSyncOnCreate

Configures whether the cache will attempt to sync items upon creation or wait until the next sync interval. Disabling this can be useful when the cache is under high load and synchronization both frequently and in large batches. Defaults to true.

def WithSyncOnCreate(
syncOnCreate: bool
) - > Option

Configures whether the cache will attempt to sync items upon creation or wait until the next sync interval. Disabling this can be useful when the cache is under high load and synchronization both frequently and in large batches. Defaults to true.

Parameters

NameTypeDescription
syncOnCreateboolA boolean value that, when true, enables immediate synchronization of cache items upon creation. When false, synchronization is deferred until the next scheduled sync interval.

Returns

TypeDescription
OptionAn Option function that modifies the cache's synchronization behavior.