Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 36838 invoked from network); 25 Jan 2001 13:23:13 -0000 Received: from fw.infoplanning.net (HELO infoplanning.com) (@209.8.58.131) by h31.sny.collab.net with SMTP; 25 Jan 2001 13:23:13 -0000 Received: (qmail 4650 invoked from network); 25 Jan 2001 13:33:25 -0000 Received: from unknown (HELO apache.org) (192.168.0.189) by inet with SMTP; 25 Jan 2001 13:33:25 -0000 Message-ID: <3A7027E3.49372E28@apache.org> Date: Thu, 25 Jan 2001 08:19:31 -0500 From: Berin Loritsch X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: AW: [C2]: Proposal for caching References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Carsten Ziegeler wrote: > OK, now I get what you meant. I think it is really a good idea. It would > lead to a repository of possible, configurable validators (equivalent > to the repository of generators, transformers etc.) and the sitemap > designer chooses the right validator for the component. > But it is not possible to write validators which are usable for any > component as only the component knows which data to test. So you > have a tight coupling between a component and its validators. If there is a tight coupling between validators, then we need to look at coupling them. More down below. > Quickly thinking I see a possible solution: > Each component declares his own usable validators which can only be used > with this component: > > > > > > .... > > > > ... > > type="http" > validator="fileChangedValidator"> > > ... > > > What do you think about this? I think that modifying the sitemap like this only serves to make things more confusing or at least cluttered. I understand the idea of swapping Validators, but I think that might be flexibility syndrome. How many ways is a FileGenerator going to invalidate a cache entry for a File? I do think they should be external components, but I also think that they should be hard-wired to the Component. FileGenerator { Validator validator = new FileChangedValidator(); ...... generate() { if (validator.hasChanged(file) { // normal processing } else { // retrieve from cache. } } }