]> sipb.mit.edu Git - ikiwiki.git/commitdiff
map: Use a contentless dependency unless show= is specified.
authorJoey Hess <joey@gnu.kitenet.net>
Sun, 4 Oct 2009 19:46:23 +0000 (15:46 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Sun, 4 Oct 2009 19:46:23 +0000 (15:46 -0400)
This makes simple maps efficient enough that they can be used on sidebars!

IkiWiki/Plugin/map.pm
debian/changelog

index 54146dc467bdcb513e426257a6fd0879005cd35a..6829607770332188e08e963be3b935e546e78a85 100644 (file)
@@ -68,13 +68,13 @@ sub preprocess (@) {
        }
 
        # Needs to update whenever a page is added or removed (or in some
        }
 
        # Needs to update whenever a page is added or removed (or in some
-       # cases, when its content changes, if show=title), so register a
-       # dependency.
-       add_depends($params{page}, $params{pages});
+       # cases, when its content changes, if show= is specified), so
+       # register a dependency.
+       add_depends($params{page}, $params{pages}, content => exists $params{show});
        # Explicitly add all currently shown pages, to detect when pages
        # are removed.
        foreach my $item (keys %mapitems) {
        # Explicitly add all currently shown pages, to detect when pages
        # are removed.
        foreach my $item (keys %mapitems) {
-               add_depends($params{page}, $item);
+               add_depends($params{page}, $item, content => exists $params{show});
        }
 
        # Create the map.
        }
 
        # Create the map.
index bec1a61d30c405cb073edbe775d4efc4c3dbcc57..ae39d48475f77d59482b5df9fd9882fb1189980c 100644 (file)
@@ -16,6 +16,8 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low
   * pagecount: Use a contentless dependency, which makes this
     directive much less expensive to use, since page edits will
     no longer trigger an unnecessary update of the page count.
   * pagecount: Use a contentless dependency, which makes this
     directive much less expensive to use, since page edits will
     no longer trigger an unnecessary update of the page count.
+  * map: Use a contentless dependency unless show= is specified.
+    This makes simple maps efficient enough that they can be used on sidebars!
 
  -- Joey Hess <joeyh@debian.org>  Sun, 27 Sep 2009 17:40:03 -0400
 
 
  -- Joey Hess <joeyh@debian.org>  Sun, 27 Sep 2009 17:40:03 -0400