summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-08-13 07:00:53 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-08-13 07:00:53 +0000
commit5b78246d11948e93f54ae32dd800e9adaf55a546 (patch)
treea37a55ffb52bd62177d69b4d39a13fa0d1095840 /IkiWiki/Plugin
parent27c1595cec8606f44d2ec33989daca70cab7d22f (diff)
memoization for injected RPC functions is a very, very good thing
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/external.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/external.pm b/IkiWiki/Plugin/external.pm
index e3504a30d..9c31a70eb 100644
--- a/IkiWiki/Plugin/external.pm
+++ b/IkiWiki/Plugin/external.pm
@@ -107,6 +107,7 @@ sub rpc_call ($$;@) { #{{{
} #}}}
package IkiWiki::RPC::XML;
+use Memoize;
sub getvar ($$$) { #{{{
my $plugin=shift;
@@ -142,6 +143,7 @@ sub inject ($@) { #{{{
IkiWiki::Plugin::external::rpc_call($plugin, $params{call}, @_)
};
eval qq{*$params{name}=\$sub};
+ memoize($params{name}) if $params{memoize};
return 1;
} #}}}