From: Brett Parker Date: Sun, 8 Jun 2008 12:29:22 +0000 (+0100) Subject: Add caching of sub menus X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/commitdiff_plain/c939dde77d9b8e0e4256f0f16e99206f55908288?ds=sidebyside;hp=d36309a6506ad8ed03626b84ff49b880665bc101 Add caching of sub menus --- diff --git a/sommitrealweird/bpcms/context_processors.py b/sommitrealweird/bpcms/context_processors.py index 0edc30a..3668ab0 100644 --- a/sommitrealweird/bpcms/context_processors.py +++ b/sommitrealweird/bpcms/context_processors.py @@ -94,6 +94,8 @@ def content_submenu(request): menu_items.sort( \ cmp=lambda x,y: cmp(x['title'].lower(), y['title'].lower())) + cache.set('bpcms_contentmenu_%s' %(folderpath), menu_items) + return { 'content_submenu': menu_items, }