CacheSyncItem
CacheSyncItem is a func type. Your implementation of this function for your cache instance is responsible for returning The new CacheItem what action should be taken. The sync function has no insight into your object, and needs to be told explicitly if the new item is different from the old one.
Methods
CacheSyncItem()
def CacheSyncItem(
ctx: context.Context,
obj: [CacheItem](cacheitem.md?sid=flytestdlib_utils_cacheitem)
) - > tuple
CacheSyncItem is a func type. Your implementation of this function for your cache instance is responsible for returning The new CacheItem what action should be taken. The sync function has no insight into your object, and needs to be told explicitly if the new item is different from the old one. Deprecated: This utility is deprecated, it has been refactored and moved into cache package.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, typically used for cancellation or deadlines. |
| obj | [CacheItem](cacheitem.md?sid=flytestdlib_utils_cacheitem) | The existing cache item that needs to be synchronized. |
Returns
| Type | Description |
|---|---|
tuple | A tuple containing the newItem (CacheItem), result (CacheSyncAction), and err (error). |