perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject Re: caching?
Date Wed, 28 Jan 2004 04:49:11 GMT
josh@yucs.org wrote:
> Does embperl support fulling caching its output (not just its
> compile), something like what could be accomplished with:
>
> [! use Memoize; memoize('Execute') !]
> [+ my $x; Execute {inputfile=>'myEmbperl.html', out=>\$x}; $x +]
>
> Does anybody actually have experience with using memoize and embperl?
> :)
>
I have never have tried memoize, but EMbperl 2 supports output cacheing out
of the box and it automaticly invalidates the cache if your source changes
and keeps track of parameters you posted to the page etc. There are a lot of
cacheing options in Embperl 2, the simplest is to say

[+ Execute ({inputfile=>'myEmbperl.html', expires_in => 60}) -]

which will cache the output for 60 seconds, you can also supply a function
that is called to determinate if the cache should be expired

Gerald




--------------------------------------------------------------
Gerald Richter     ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
--------------------------------------------------------------
|
|   ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message