Commit fc556a6a authored by Jim Fulton's avatar Jim Fulton

Fixed bug in caching code.

parent c834b28b
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
__doc__='''Generic Database adapter __doc__='''Generic Database adapter
$Id: DA.py,v 1.27 1998/01/22 20:50:53 jim Exp $''' $Id: DA.py,v 1.28 1998/01/26 21:40:41 jim Exp $'''
__version__='$Revision: 1.27 $'[11:-2] __version__='$Revision: 1.28 $'[11:-2]
import OFS.SimpleItem, Aqueduct.Aqueduct, Aqueduct.RDB import OFS.SimpleItem, Aqueduct.Aqueduct, Aqueduct.RDB
import DocumentTemplate, marshal, md5, base64, DateTime, Acquisition, os import DocumentTemplate, marshal, md5, base64, DateTime, Acquisition, os
...@@ -172,7 +172,8 @@ class DA( ...@@ -172,7 +172,8 @@ class DA(
if k > t: if k > t:
result=r result=r
if not compressed: result=decompress(r) if not compressed: result=decompress(r)
else: return result
result=apply(DB__.query, query) result=apply(DB__.query, query)
r=compress(result) r=compress(result)
cache[query]= now, r cache[query]= now, r
...@@ -348,6 +349,9 @@ def getBrain(self, ...@@ -348,6 +349,9 @@ def getBrain(self,
############################################################################## ##############################################################################
# #
# $Log: DA.py,v $ # $Log: DA.py,v $
# Revision 1.28 1998/01/26 21:40:41 jim
# Fixed bug in caching code.
#
# Revision 1.27 1998/01/22 20:50:53 jim # Revision 1.27 1998/01/22 20:50:53 jim
# Fixed stupid typo in text output form. # Fixed stupid typo in text output form.
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment