From 5b78246d11948e93f54ae32dd800e9adaf55a546 Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 13 Aug 2007 07:00:53 +0000 Subject: memoization for injected RPC functions is a very, very good thing --- plugins/externaldemo | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/externaldemo') 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: ". -- cgit v1.2.3