At 12:37 PM 4/2/01 -0700, you wrote:
>For example, our home page may say:
>
>1. Click here to register (no cookie)
>2. Welcome back blah, sign-in here (has a cookie, not signed in)
>3. Welcome back blah (has cookie, already signed in)
>
>If this page is hard to generate and static other than this, we'd
>generate the page with a placeholder.  When the page is accessed,
>read the cached page, replace the placeholders, send it out.
>
>The assumption here is that replacing placeholders is more efficient
>than re-generating the content.  So basically, "give me this
>cached page and replace parameters name=xyz, sign-in-url=http://...".
>
>Jim

I wonder what the easiest/quickest way to replace the placeholders is....

I've been reading Kimball's "The Data Webhouse Toolkit", and he discusses a
"Hot Response Cache" that would work well with your placeholders.

His hot response cache is a filesystem containing pre-calculated queries
(generated at convenient times by a batch process.)  Perhaps you run
through the books you sell and determine for each book, pair of books,
etc., what other people who have bought those books have purchased.  You
place the results of that query in a findable location in the filesystem so
that you compute it only once.  Similar I guess to Philg's util_memoize,
except that it gets computed at predetermined times.

Actually, that could be a useful extension to util_memoize: look for the
query in the cache: if it's found use it.  If it's not found, calculate
it.  Schedule the query to be run at non-peak times, where non-peak might
be determined by your clock, or your system load.


Jerry
=====================================================
Jerry Asher                       [EMAIL PROTECTED]
1678 Shattuck Avenue Suite 161    Tel: (510) 549-2980
Berkeley, CA 94709                Fax: (877) 311-8688

Reply via email to