From 78096fab30cbccd4feb5c510710b8cb12dd39635 Mon Sep 17 00:00:00 2001 From: "roberto@goyle" Date: Fri, 18 Feb 2011 19:34:02 +0100 Subject: [PATCH] cache items can have a 16bit flags --- cache.c | 2 +- plugins/python/uwsgi_pymodule.c | 2 +- uwsgi.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cache.c b/cache.c index 6b012bec..3fb41abd 100644 --- a/cache.c +++ b/cache.c @@ -226,7 +226,7 @@ int uwsgi_cache_request(struct wsgi_request *wsgi_req) { argc = 3; if (!uwsgi_parse_array(wsgi_req->buffer, wsgi_req->uh.pktsize, argv, &argc)) { if (argc > 1) { - uwsgi_cache_set(argv[0], strlen(argv[0]), argv[1], strlen(argv[1]), 0); + uwsgi_cache_set(argv[0], strlen(argv[0]), argv[1], strlen(argv[1]), 0, 0); } } } diff --git a/plugins/python/uwsgi_pymodule.c b/plugins/python/uwsgi_pymodule.c index caeea170..636859d8 100644 --- a/plugins/python/uwsgi_pymodule.c +++ b/plugins/python/uwsgi_pymodule.c @@ -2425,7 +2425,7 @@ PyObject *py_uwsgi_cache_set(PyObject * self, PyObject * args) { } else if (uwsgi.cache_max_items) { uwsgi_wlock(uwsgi.cache_lock); - if (uwsgi_cache_set(key, keylen, value, vallen, expires)) { + if (uwsgi_cache_set(key, keylen, value, vallen, expires, 0)) { uwsgi_rwunlock(uwsgi.cache_lock); Py_INCREF(Py_None); return Py_None; diff --git a/uwsgi.h b/uwsgi.h index 52b37122..42d6c07f 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -1360,7 +1360,7 @@ ssize_t uwsgi_send_message(int, uint8_t, uint8_t, char *, uint16_t, int, ssize_t char *uwsgi_cluster_best_node(void); -int uwsgi_cache_set(char *, uint16_t, char *, uint64_t, uint64_t); +int uwsgi_cache_set(char *, uint16_t, char *, uint64_t, uint64_t, uint16_t); int uwsgi_cache_del(char *, uint16_t); char *uwsgi_cache_get(char *, uint16_t, uint64_t *); uint32_t uwsgi_cache_exists(char *, uint16_t);