From 271ac331936e1a429532aab277be60942d668d9f Mon Sep 17 00:00:00 2001 From: Unbit Date: Thu, 24 Jan 2013 20:20:14 +0100 Subject: [PATCH] fixed a regression caused by new caching system --- core/protocol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/protocol.c b/core/protocol.c index 9b0a9768..f28c28eb 100644 --- a/core/protocol.c +++ b/core/protocol.c @@ -657,7 +657,7 @@ static int uwsgi_proto_check_15(struct wsgi_request *wsgi_req, char *key, char * return 0; } - if (uwsgi.caches > 0 && !uwsgi_proto_key("UWSGI_CACHE_GET", 15)) { + if (uwsgi.caches && !uwsgi_proto_key("UWSGI_CACHE_GET", 15)) { wsgi_req->cache_get = buf; wsgi_req->cache_get_len = len; return 0; @@ -851,7 +851,7 @@ next: // check if data are available in the local cache if (wsgi_req->cache_get_len > 0) { uint64_t cache_value_size; - char *cache_value = uwsgi_cache_get(wsgi_req->cache_get, wsgi_req->cache_get_len, &cache_value_size); + char *cache_value = uwsgi_cache_get2(uwsgi.caches, wsgi_req->cache_get, wsgi_req->cache_get_len, &cache_value_size); if (cache_value && cache_value_size > 0) { uwsgi_response_write_body_do(wsgi_req, cache_value, cache_value_size); wsgi_req->status = -1; @@ -862,7 +862,7 @@ next: if (uwsgi.check_cache && wsgi_req->uri_len && wsgi_req->method_len == 3 && wsgi_req->method[0] == 'G' && wsgi_req->method[1] == 'E' && wsgi_req->method[2] == 'T') { uint64_t cache_value_size; - char *cache_value = uwsgi_cache_get(wsgi_req->uri, wsgi_req->uri_len, &cache_value_size); + char *cache_value = uwsgi_cache_get2(uwsgi.caches, wsgi_req->uri, wsgi_req->uri_len, &cache_value_size); if (cache_value && cache_value_size > 0) { uwsgi_response_write_body_do(wsgi_req, cache_value, cache_value_size); wsgi_req->status = -1;