# Tuning Fork cache utilities

Optional persistent cache object to use with Tuning Fork.

## Summary

| ### Typedefs ||
|---|---|
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/t-f-cache#group___t_f_cache_1ga368ffbab21fc87f05f680f399eab3e7c)(uint64_t key, CProtobufSerialization *value, void *user_data)` | typedef `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork#group__tuningfork_1gaa2f4878a49a6309e1c0af6ca76f1149f(*` Pointer to a function that can be attached to [TFCache::get](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/t-f-cache#struct_t_f_cache_1a8c4095e4fe3f46d7b64f18631147787d). |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/t-f-cache#group___t_f_cache_1gaeba6aa5ca1cc9a6542eb4cd2009f4d10)(uint64_t key, void *user_data)` | typedef `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork#group__tuningfork_1gaa2f4878a49a6309e1c0af6ca76f1149f(*` Pointer to a function that can be attached to [TFCache::remove](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/t-f-cache#struct_t_f_cache_1a5656c0622a5b79635af6e446208cf687). |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/t-f-cache#group___t_f_cache_1gadc752781c31efad865ea556ea7a265d3)(uint64_t key, const CProtobufSerialization *value, void *user_data)` | typedef `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork#group__tuningfork_1gaa2f4878a49a6309e1c0af6ca76f1149f(*` Pointer to a function that can be attached to [TFCache::set](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/t-f-cache#struct_t_f_cache_1a3a86f725982d4c549c0cb41c31b569de). |

| ### Structs ||
|---|---|
| [TFCache](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/t-f-cache) | An object used to cache upload data when no connection is available. |

## Typedefs

### PFnTFCacheGet

```scdoc
TFErrorCode(* PFnTFCacheGet)(uint64_t key, CProtobufSerialization *value, void *user_data)
```
Pointer to a function that can be attached to [TFCache::get](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/t-f-cache#struct_t_f_cache_1a8c4095e4fe3f46d7b64f18631147787d).

Function that will be called to get a value for a key. **See also:** [TFCache](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/t-f-cache#struct_t_f_cache)

### PFnTFCacheRemove

```scdoc
TFErrorCode(* PFnTFCacheRemove)(uint64_t key, void *user_data)
```
Pointer to a function that can be attached to [TFCache::remove](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/t-f-cache#struct_t_f_cache_1a5656c0622a5b79635af6e446208cf687).

Function that will be called to remove an entry in the cache. **See also:** [TFCache](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/t-f-cache#struct_t_f_cache)

### PFnTFCacheSet

```gdscript
TFErrorCode(* PFnTFCacheSet)(uint64_t key, const CProtobufSerialization *value, void *user_data)
```
Pointer to a function that can be attached to [TFCache::set](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/t-f-cache#struct_t_f_cache_1a3a86f725982d4c549c0cb41c31b569de).

Function that will be called to set a value for a key. **See also:** [TFCache](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/t-f-cache#struct_t_f_cache)