memoize get_activity
authorProduction Moz <dev@sopinspace.com>
Tue, 31 May 2011 17:52:28 +0200
changeset 344 9787360440db
parent 342 b613783c71e8
child 345 2ff8619302bd
memoize get_activity
src/cm/activity.py
--- a/src/cm/activity.py	Wed Dec 08 20:57:35 2010 +0100
+++ b/src/cm/activity.py	Tue May 31 17:52:28 2011 +0200
@@ -49,6 +49,9 @@
 
 VISIT_DURATION = timedelta(seconds=30 * 60) # 30 minutes
 
+from cm.utils.cache import memoize, dj_memoize
+
+@dj_memoize
 def get_activity(text='all', user='all', reference_date=None, nb_slots=31, slot_timedelta=timedelta(days=1), action="all", kind=''):
     """
     text : text: specific text