From 4ad9c8d03480c72e08199c45c2a1f332ab4c8bcd Mon Sep 17 00:00:00 2001 From: Unbit Date: Fri, 8 Mar 2013 20:00:25 +0100 Subject: [PATCH] fixed default cache set --- core/cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cache.c b/core/cache.c index ab5da35b..9dd86448 100644 --- a/core/cache.c +++ b/core/cache.c @@ -934,8 +934,8 @@ struct uwsgi_cache *uwsgi_cache_create(char *arg) { uc->name = "default"; uc->name_len = strlen(uc->name); uc->blocksize = uwsgi.cache_blocksize; - uc->max_item_size = uc->blocksize; if (!uc->blocksize) uc->blocksize = UMAX16; + uc->max_item_size = uc->blocksize; uc->max_items = uwsgi.cache_max_items; uc->blocks = uwsgi.cache_max_items; uc->keysize = 2048; @@ -1476,6 +1476,7 @@ int uwsgi_cache_magic_set(char *key, uint16_t keylen, char *value, uint64_t vall char *cache_server = NULL; char *cache_name = NULL; uint16_t cache_name_len = 0; + if (cache) { char *at = strchr(cache, '@'); if (!at) {