diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-08-13 07:00:53 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-08-13 07:00:53 +0000 |
commit | 5b78246d11948e93f54ae32dd800e9adaf55a546 (patch) | |
tree | a37a55ffb52bd62177d69b4d39a13fa0d1095840 /IkiWiki/Plugin | |
parent | 27c1595cec8606f44d2ec33989daca70cab7d22f (diff) |
memoization for injected RPC functions is a very, very good thing
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/external.pm | 2 |
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; } #}}} |