On Monday 11 April 2005 15:01, Olaf Mersmann wrote:
> Hi list,
>
> due to various design decisions, we generate some heavily used ADP pages
> as strings on certain events and reuse them thereafter. As far as I can
> tell, ns_adp_parse -string does not cache the parsed representation of
> these (how could it, there's no real identifier short of the whole
> string?).
>
> Is there a way to cache the parsed representation externally in a
> variable? If not, I quess my best option is to write out the strings to
> a tmpfile and use it with ns_adp_parse -file.
>
> Thanks for any hints.

It depends on the result of your ns_adp_parse call. If it is static text/html,
I would probably write it to file. If it is adp code (seems doubtful), maybe
check with how OACS caches bytecode and executes it from memory.

A simple solution is the very old ACS util_memoize procedures.

But I see a little bit of confusion in you problem statement. Any cache is
going to require a unique key, most of this will probably come from the
string value, but the result of the cache lookup will be what

'ns_adp_parse -string $my_string'

produces, which could be much larger than the key.

Also, if you have a bunch of full urls which are occasionally generated and
need to be cached, maybe just use a caching proxy.

I'm sure if you provide more details you will get better advice. There are
many pretty easy solutions you can try out.

tom jackson


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to