cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject AW: cvs commit: xml-cocoon/src/org/apache/cocoon/reading DatabaseReader.java
Date Mon, 07 May 2001 06:19:45 GMT
> Giacomo Pati wrote:
>
> On 4 May 2001 bloritsch@apache.org wrote:
> 
> > bloritsch    01/05/04 12:43:12
> >
> >   Modified:    src/org/apache/cocoon/reading Tag: xml-cocoon2
> >                         DatabaseReader.java
> >   Log:
> >   Made DatabaseReader cacheable.  It's wicked fast.  Great improvement.
> >
> >   Revision  Changes    Path
> >   No                   revision
> >
> >
> >   No                   revision
> >
> >
> >   1.1.2.16  +115 -47   
> xml-cocoon/src/org/apache/cocoon/reading/Attic/DatabaseReader.java
> >
> 
> <snip/>
> 
> >   +    /**
> >   +     * Generate the validity object.
> >   +     *
> >   +     * @return The generated validity object or 
> <code>null</code> if the
> >   +     *         component is currently not cacheable.
> >   +     */
> >   +    public CacheValidity generateValidity() {
> >   +        if (this.lastModified > 0) {
> >   +            return new TimeStampCacheValidity(this.lastModified);
> >   +        } else {
> >   +            return new NOPCacheValidity();
> >   +        }
> >   +    }
> 
> I'm not quite sure but doesn't this mean that if there is no
> lastModified value it will never be invalidated because of the
> NOPCacheValidity?
>
Absolutely, the correct solution is to return <code>null</code>,
indicating that this is currently not cacheable.


Carsten 

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de 
================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message