diff --git a/core/cache.c b/core/cache.c index 84dd5cdd..98d974b6 100644 --- a/core/cache.c +++ b/core/cache.c @@ -843,7 +843,7 @@ void uwsgi_cache_start_sync_servers() { */ } -void uwsgi_cache_create(char *arg) { +struct uwsgi_cache *uwsgi_cache_create(char *arg) { struct uwsgi_cache *old_uc = NULL, *uc = uwsgi.caches; while(uc) { old_uc = uc; @@ -941,6 +941,7 @@ void uwsgi_cache_create(char *arg) { } uwsgi_cache_init(uc); + return uc; } struct uwsgi_cache *uwsgi_cache_by_name(char *name) { diff --git a/uwsgi.h b/uwsgi.h index e444164f..94e06206 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -2639,7 +2639,7 @@ int uwsgi_cache_set2(struct uwsgi_cache *, char *, uint16_t, char *, uint64_t, u int uwsgi_cache_del2(struct uwsgi_cache *, char *, uint16_t, uint64_t, uint16_t); char *uwsgi_cache_get2(struct uwsgi_cache *, char *, uint16_t, uint64_t *); uint32_t uwsgi_cache_exists2(struct uwsgi_cache *, char *, uint16_t); -void uwsgi_cache_create(char *); +struct uwsgi_cache *uwsgi_cache_create(char *); struct uwsgi_cache *uwsgi_cache_by_name(char *); void uwsgi_cache_create_all(void); char *uwsgi_cache_safe_get2(struct uwsgi_cache *, char *, uint16_t, uint64_t *);