This commit is contained in:
Max Lv
2013-07-21 19:34:25 +08:00
parent 5846e389e1
commit 4d30a8a7bf
5 changed files with 2029 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
/*
* Original Author: Oliver Lorenz (ol), olli@olorenz.org, https://olorenz.org
* License: This is licensed under the same terms as uthash itself
*/
#ifndef _CACHE_
#define _CACHE_
struct client_cache;
extern int client_cache_create(struct foo_cache **dst, const size_t capacity,
void (*free_cb) (void *element));
extern int client_cache_delete(struct foo_cache *cache, int keep_data);
extern int client_cache_lookup(struct foo_cache *cache, char *key, void *result);
extern int client_cache_insert(struct foo_cache *cache, char *key, void *data);
#endif