AutoRefreshCache with regular GetOrCreate and Delete along with background asynchronous refresh. Caller provides callbacks for create, refresh and delete item. The cache doesn't provide apis to update items. Deprecated: This utility is deprecated, it has been refactored and moved into `cache` packag
| 17 | // The cache doesn't provide apis to update items. |
| 18 | // Deprecated: This utility is deprecated, it has been refactored and moved into `cache` package. |
| 19 | type AutoRefreshCache interface { |
| 20 | // starts background refresh of items |
| 21 | Start(ctx context.Context) |
| 22 | |
| 23 | // Get item by id if exists else null |
| 24 | Get(id string) CacheItem |
| 25 | |
| 26 | // Get object if exists else create it |
| 27 | GetOrCreate(item CacheItem) (CacheItem, error) |
| 28 | } |
| 29 | |
| 30 | // Deprecated: This utility is deprecated, it has been refactored and moved into `cache` package. |
| 31 | type CacheItem interface { |
no outgoing calls
no test coverage detected