aboutsummaryrefslogtreecommitdiff
path: root/plugins/externaldemo
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 /plugins/externaldemo
parent27c1595cec8606f44d2ec33989daca70cab7d22f (diff)
downloadikiwiki-5b78246d11948e93f54ae32dd800e9adaf55a546.tar
ikiwiki-5b78246d11948e93f54ae32dd800e9adaf55a546.tar.gz
memoization for injected RPC functions is a very, very good thing
Diffstat (limited to 'plugins/externaldemo')
-rwxr-xr-xplugins/externaldemo5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/externaldemo b/plugins/externaldemo
index 6bbced30e..1321a4bc5 100755
--- a/plugins/externaldemo
+++ b/plugins/externaldemo
@@ -102,8 +102,9 @@ sub import {
# Here's an example of how to inject an arbitrary function into
# ikiwiki. Ikiwiki will be able to call bob() just like any other
- # function.
- rpc_call("inject", name => "IkiWiki::bob", call => "bob");
+ # function. Note use of automatic memoization.
+ rpc_call("inject", name => "IkiWiki::bob", call => "bob",
+ memoize => 1);
# Here's an exmaple of how to access values in %IkiWiki::config.
print STDERR "url is set to: ".