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
| Name | Type | Description |
|---|---|---|
| syncOnCreate | bool | A 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
| Type | Description |
|---|---|
Option | An Option function that modifies the cache's synchronization behavior. |