Assume that every page has been scanned by the time the scan phase ends
[ikiwiki.git] / IkiWiki / Render.pm
index c88de1e8e5f7f8974729b6e5a52be956149bb3f3..825c077daa7416483f731cc0e31ed4add4444fab 100644 (file)
@@ -154,7 +154,7 @@ sub genpage ($$) {
 
 sub scan ($) {
        my $file=shift;
-       return if $scanned{$file};
+       return if $phase > PHASE_SCAN || $scanned{$file};
        $scanned{$file}=1;
 
        debug(sprintf(gettext("scanning %s"), $file));
@@ -883,6 +883,9 @@ sub refresh () {
 
        # At this point it becomes OK to start matching pagespecs.
        $phase = PHASE_RENDER;
+       # Save some memory: we no longer need to keep track of which pages
+       # we've scanned
+       %scanned = ();
 
        remove_del(@$del, @$internal_del);