cache_set

March 26, 2020 Contributors

Name

cache_set

Synopsis

#include "hooks/core/cache_set.h"

| void **cache_set** ( | closure, |   |
|   | name, |   |
|   | key, |   |
|   | klen, |   |
|   | value, |   |
|   | vlen, |   |
|   | whence); |   |

void * <var class="pdparam">closure</var>;
const char * <var class="pdparam">name</var>;
const void * <var class="pdparam">key</var>;
int <var class="pdparam">klen</var>;
void * <var class="pdparam">value</var>;
int <var class="pdparam">vlen</var>;
u_int32_t <var class="pdparam">whence</var>;

| int **has_core_cache_set_hook** ( | ); |   |

| void **register_core_cache_set_hook_first** ( | hook, |   |
|   | closure); |   |

ec_hook_core_cache_set_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;

| void **register_core_cache_set_hook_last** ( | hook, |   |
|   | closure); |   |

ec_hook_core_cache_set_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;

| void **call_core_cache_set_hook** ( | name, |   |
|   | key, |   |
|   | klen, |   |
|   | value, |   |
|   | vlen, |   |
|   | whence); |   |

const char * <var class="pdparam">name</var>;
const void * <var class="pdparam">key</var>;
int <var class="pdparam">klen</var>;
void * <var class="pdparam">value</var>;
int <var class="pdparam">vlen</var>;
u_int32_t <var class="pdparam">whence</var>;

Description

Momentum exposes the cache_set hook as a stub for generic, process-wide caching. cache_set should place the key and value specified in key/klen and value/vlen, respectively in the cache named name.