From 73ccac4ccb3cf1153218840d828250057191b9a4 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 12 Dec 2012 14:42:17 +0530 Subject: [PATCH] moved recent to memcache --- patches/december_2012/move_recent_to_memcache.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 patches/december_2012/move_recent_to_memcache.py diff --git a/patches/december_2012/move_recent_to_memcache.py b/patches/december_2012/move_recent_to_memcache.py new file mode 100644 index 00000000000..ee94121977a --- /dev/null +++ b/patches/december_2012/move_recent_to_memcache.py @@ -0,0 +1,7 @@ +import webnotes, json + +def execute(): + for p in webnotes.conn.sql("""select name, recent_documents from + tabProfile where ifnull(recent_documents,'')!=''"""): + if not '~~~' in p[1]: + webnotes.cache().set_value("recent:" + p[0], json.loads(p[1])) \ No newline at end of file