Store queries in memcache
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 29 Aug 2009 14:33:48 -0700
changeset 2851 792e2c58dc62
parent 2850 c935cb48f757
child 2852 cdef54d9a356
Store queries in memcache
app/soc/logic/models/base.py
--- a/app/soc/logic/models/base.py	Sat Aug 29 14:33:22 2009 -0700
+++ b/app/soc/logic/models/base.py	Sat Aug 29 14:33:48 2009 -0700
@@ -356,6 +356,13 @@
       - Query object instantiated with the given properties
     """
 
+    from google.appengine.api import memcache
+    queries = memcache.get('__melange__queries')
+    if not queries:
+        queries = []
+    queries.append((self._model.__name__, filter, order))
+    memcache.set('__melange_queries', queries)
+
     if not filter:
       filter = {}