# 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/tuning-fork-cache#group___tuning_fork___cache_1gab37d34ddaade3d5110a30573597c74f8` | typedef `struct https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-cache#struct_tuning_fork___cache` An object used to cache upload data when no connection is available. |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/tuning-fork-cache#group___tuning_fork___cache_1gaf1457e5768f927824caf54f1b1144a92)(uint64_t key, TuningFork_CProtobufSerialization *value, void *user_data)` | typedef `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork#group__tuningfork_1ga37de0aa93ae4d18dacdf21778a559527(*` Pointer to a function that can be attached to [TuningFork_Cache::get](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-cache#struct_tuning_fork___cache_1af7fac12d2c74822bf0a5a661dd5e179a). |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/tuning-fork-cache#group___tuning_fork___cache_1ga1ea87fb9fa896a11ff969df3a5f3421f)(uint64_t key, void *user_data)` | typedef `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork#group__tuningfork_1ga37de0aa93ae4d18dacdf21778a559527(*` Pointer to a function that can be attached to [TuningFork_Cache::remove](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-cache#struct_tuning_fork___cache_1a61b2f886317ebae2010cb1b8207546c8). |
| `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/tuning-fork-cache#group___tuning_fork___cache_1gac40b998bfe7aba439fff94e1e7900dae)(uint64_t key, const TuningFork_CProtobufSerialization *value, void *user_data)` | typedef `https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/group/tuningfork#group__tuningfork_1ga37de0aa93ae4d18dacdf21778a559527(*` Pointer to a function that can be attached to [TuningFork_Cache::set](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-cache#struct_tuning_fork___cache_1a4478018e45f41b8e94b9b615a0d63e7a). |

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

## Typedefs

### TuningFork_Cache

```scdoc
struct TuningFork_Cache TuningFork_Cache
```
An object used to cache upload data when no connection is available.

If you do not supply one of these, data is saved to a temporary file.

### TuningFork_CacheGet

```scdoc
TuningFork_ErrorCode(* TuningFork_CacheGet)(uint64_t key, TuningFork_CProtobufSerialization *value, void *user_data)
```
Pointer to a function that can be attached to [TuningFork_Cache::get](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-cache#struct_tuning_fork___cache_1af7fac12d2c74822bf0a5a661dd5e179a).

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

### TuningFork_CacheRemove

```scdoc
TuningFork_ErrorCode(* TuningFork_CacheRemove)(uint64_t key, void *user_data)
```
Pointer to a function that can be attached to [TuningFork_Cache::remove](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-cache#struct_tuning_fork___cache_1a61b2f886317ebae2010cb1b8207546c8).

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

### TuningFork_CacheSet

```gdscript
TuningFork_ErrorCode(* TuningFork_CacheSet)(uint64_t key, const TuningFork_CProtobufSerialization *value, void *user_data)
```
Pointer to a function that can be attached to [TuningFork_Cache::set](https://developer.android.com/games/sdk/reference/performance-tuner/custom-engine/struct/tuning-fork-cache#struct_tuning_fork___cache_1a4478018e45f41b8e94b9b615a0d63e7a).

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