]> git.sommitrealweird.co.uk Git - sommitrealweird.git/commitdiff
Add caching of sub menus
authorBrett Parker <brettp@erwin.sommitrealweird.co.uk>
Sun, 8 Jun 2008 12:29:22 +0000 (13:29 +0100)
committerBrett Parker <brettp@erwin.sommitrealweird.co.uk>
Sun, 8 Jun 2008 12:29:22 +0000 (13:29 +0100)
sommitrealweird/bpcms/context_processors.py

index 0edc30af4e26242bed1dd99e0cfbcedc980256c7..3668ab008dfdb475cf6400ec7b900b1a1c7318e9 100644 (file)
@@ -94,6 +94,8 @@ def content_submenu(request):
         menu_items.sort( \
             cmp=lambda x,y: cmp(x['title'].lower(), y['title'].lower()))
 
         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,
     }
     return {
         'content_submenu': menu_items,
     }