]> sipb.mit.edu Git - ikiwiki.git/commitdiff
po(change): flush Memoize cache, to fix bug after rename/remove
authorintrigeri <intrigeri@boum.org>
Wed, 12 Nov 2008 20:15:33 +0000 (21:15 +0100)
committerintrigeri <intrigeri@boum.org>
Wed, 12 Nov 2008 20:18:48 +0000 (21:18 +0100)
Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/po.pm
doc/plugins/po.mdwn

index 1212181ca39b5747cbc9ac635e66f1af6ea885c8..5e2aea6911dfb9415f4c9db69abff5cc9788ce39 100644 (file)
@@ -364,6 +364,7 @@ sub change(@) { #{{{
                # Reinitialize module's private variables.
                resetalreadyfiltered();
                resettranslationscache();
+               flushmemoizecache();
                # Trigger a wiki refresh.
                require IkiWiki::Render;
                # without preliminary saveindex/loadindex, refresh()
@@ -658,6 +659,11 @@ sub resettranslationscache() { #{{{
        undef %translations;
 } #}}}
 
+sub flushmemoizecache() { #{{{
+       Memoize::flush_cache("_istranslation");
+       Memoize::flush_cache("percenttranslated");
+} #}}}
+
 sub urlto_with_orig_beautiful_urlpath($$) { #{{{
        my $to=shift;
        my $from=shift;
index 14ce07866e5794d68e1410b891d47963f0340f2d..209b573cbc7aaff4c7b4dc1669df9ed69f1d1883 100644 (file)
@@ -592,10 +592,8 @@ Robustness tests
 ### Creating pages
 
 - creating a master page via RCS: **OK**
-- creating a master page via CGI: **FIXME** the new page's
-  translations are rendered as if they weren't translations (i.e.
-  `targetpage=newpage.LL/index.html`, and no de-gettext-isation);
-  touch'ing `newpage.mdwn` + refresh does not fix it, rebuild does.
+- creating a master page via CGI: **FIXME** the new master page has no
+  `otherlanguages` links until refreshed once more
 
 ### Deleting pages