X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D031E329F8B for ; Mon, 27 Sep 2004 19:59:23 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 97273-04 for ; Mon, 27 Sep 2004 18:59:17 +0000 (GMT) Received: from mproxy.gmail.com (mproxy.gmail.com [216.239.56.240]) by svr1.postgresql.org (Postfix) with ESMTP id 1C8B6329F99 for ; Mon, 27 Sep 2004 19:59:16 +0100 (BST) Received: by mproxy.gmail.com with SMTP id w67so235194cwb for ; Mon, 27 Sep 2004 11:59:15 -0700 (PDT) Received: by 10.11.117.63 with SMTP id p63mr28155cwc; Mon, 27 Sep 2004 11:59:15 -0700 (PDT) Received: by 10.11.119.12 with HTTP; Mon, 27 Sep 2004 11:59:13 -0700 (PDT) Message-ID: <330532b604092711591491303a@mail.gmail.com> Date: Mon, 27 Sep 2004 14:59:13 -0400 From: Mitch Pirtle Reply-To: Mitch Pirtle To: pgsql-performance@postgresql.org Subject: Re: Caching of Queries In-Reply-To: <00e801c4a4b6$5526dd30$8300a8c0@solent> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <00e801c4a4b6$5526dd30$8300a8c0@solent> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/290 X-Sequence-Number: 8418 On Mon, 27 Sep 2004 18:20:48 +0100, Matt Clark wrote: > This is very true. Client side caching is an enormous win for apps, but it > requires quite a lot of logic, triggers to update last-modified fields on > relevant tables, etc etc. Moving some of this logic to the DB would perhaps > not usually be quite as efficient as a bespoke client caching solution, but > it will above all be a lot easier for the application developer! In the world of PHP it is trivial thanks to PEAR's Cache_Lite. The project lead for Mambo implemented page-level caching in a day, and had all the triggers for clearing the cache included in the content management interface - not difficult at all. Basically you set a default in seconds for the HTML results to be cached, and then have triggers set that force the cache to regenerate (whenever CRUD happens to the content, for example). Can't speak for Perl/Python/Ruby/.Net/Java, but Cache_Lite sure made a believer out of me! -- Mitch