Hi,

The cache is actually a bit complex to follow -- I'll add some
comments to help describe.  Basically:

-- Each thread maintains a cache of ADP code which includes per-
interp byte codes and pointers to text regions in a shared area.
When all threads no longer point to the shared text, it's free'd from
memory.

-- When enabled, the execution cache is simply the replacement of
what would have been per-interp byte code blocks with pointers to
combined runs of text.

-- Files on disk are checked on each request, whether execution
caching is enabled or not, via a stat call.  On Unix the key in the
cache is device/inode (which allows the same file pointed by multiple
symlinks to be only read once) and on Windows via filename.


-Jim






On Jun 27, 2005, at 7:45 AM, Dossy Shiobara wrote:

On 2005.06.27, Bas Scheffers <[EMAIL PROTECTED]> wrote:

This sounds very interesting! Few questions about the cache:

Where does it store the generated pages? Just in memory, or on disk?


In an Ns_Cache named nsadp:$servername:$itPtr, it looks like -- I'm
not
sure why it's in a per-interp cache, that seems to defeat the purpose.
This really ought to be a server-wide cache sitting in
servPtr->adp.cache rather than itPtr->adp.cache ...


What is used as "key" for the cached page, the arguments you pass
the ADP?


I think the key (should be) a Tcl list, with elements being the full
path to the ADP plus all the ADP args.  I'd have to re-read the new
code
to see if that's how Jim implemented it, though.


How do you clear the cache?


[ns_cache_flush] should work.


-- Dossy

--
Dossy Shiobara                       mail: [EMAIL PROTECTED]
Panoptic Computer Network             web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)


--
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.



--
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