From 9e497fbf5aa44bb1af43e6ef6a7867f1eacc59f3 Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Sun, 26 Feb 2012 15:40:52 -0600 Subject: [PATCH] fixed issue 677, length of key in baseadapter, thanks Blomqvist --- VERSION | 2 +- gluon/dal.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 0c58ecc8..830f4bf6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.4 (2012-02-26 15:38:27) stable +Version 1.99.4 (2012-02-26 15:40:29) stable diff --git a/gluon/dal.py b/gluon/dal.py index 31640901..53b37866 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -1303,7 +1303,7 @@ class BaseAdapter(ConnectionPool): (cache_model, time_expire) = attributes['cache'] del attributes['cache'] key = self.uri + '/' + sql - key = (key<=200) and key or hashlib.md5(key).hexdigest() + key = (len(key)<=200) and key or hashlib.md5(key).hexdigest() rows = cache_model(key, lambda: response(sql), time_expire) else: rows = response(sql)