[ic] [timed-build] - search pages

Kevin Walsh interchange-users@interchange.redhat.com
Fri Feb 1 04:14:00 2002


> I read the info on the [timed-build] tag, and it seems to be what I need.  I
> have a several complex searches which need to be "cached" so they don't have
> to query the database each time they're called up.  Unfortunately, the
> [timed-build] tag seems to build the results.html page, and any time that
> results page is called, regardless of which query is being run, it shows the
> same contents.  Is there any way to accomplish the same type of work as the
> [timed-build] tag, only using it in a search results page that will have
> several separate searches run on it, which need to be saved?
>
You really don't want to wrap the [timed-build] tag around your
results.html page for a number of reasons.

As you have found, [timed-build] will write its interpolated body to
the specified file and then read from that file the next time it is
called (until the specified timeout expires) saving the time it takes
to read from the database and interpolate again.

The results.html page will be called to display the results of your
customers' searches, most of which will differ, so you don't want
the first set of results to be cached in this way.

You could make up a filename from the search parameters and read/write
that, but that won't work for searches that span multiple pages.

You are probably just going to have to live with the time it takes
to run your "complex" query.  Perhaps you could work on the query
to make it quicker.

Sorry this is not a lot of help.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/