Skip to main content

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

NameTypeDescription
ctxcontext.ContextThe 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

TypeDescription
tupleA tuple containing the newItem (CacheItem), result (CacheSyncAction), and err (error).