fixed issue 677, length of key in baseadapter, thanks Blomqvist

This commit is contained in:
Massimo Di Pierro committed 2012-02-26 15:40:52 -06:00
1 parent 3c90ee1ed0
commit 9e497fbf5a
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1 +1 @@
Version 1.99.4 (2012-02-26 15:38:27) stable
Version 1.99.4 (2012-02-26 15:40:29) stable
+1 -1
View File
@@ -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)