Bill Moseley wrote:
On Mon, May 19, 2008 at 05:57:26PM +0200, Emmanuel Quevillon wrote:
Hi,
I don't know if this question have been already sent or not
but I am wondering if it is possible to sort cache a pager
into the catalyst application to be able to quickly get
results from a query that would have been cached.
More explanation :
I read in Jrock's book that a pager is quite easy to
implement using $rs->page() and a page parameter in the
query url to display results. However, this example (and
method) obligate to redo the query search each time the user
ask for the next, previous or last page. In the case the
request takes a very long time, navigate through results
start to be a pain. So is there a solution or would it be
reasonable to think of caching the pager in the catalyst
application to directly access each pages without requesting
the database for the same query?
Hi Bill,
If the page does not change when going to "previous" then maybe what
you really need is to simply set caching headers so the client
(browser) will cache the page.
If I understood well, this would mean that the 'previous'
button would be a simple 'back' button?
Set Expires short and if you need
control use a cache-busting query parameter that you can change when
you want to force a real page fetch.
What do you exactly mean by 'cache-busting' query parameter?
Thanks anyway to other people who took time to reply.
Regards
--
-------------------------
Emmanuel Quevillon
Biological Software and Databases Group
Institut Pasteur
+33 1 44 38 95 98
tuco at_ pasteur dot fr
-------------------------
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/