cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Lichtenberger <>
Subject Bug in Cocoon-Caching?
Date Mon, 22 Mar 2010 20:30:16 GMT

I've written generators, and caching generators which extend the
non-caching components and implement CachingPipelineComponent. The
isValid(CacheKey) method is as follows:

   * Check if caching period expired.
   * @see
  public boolean isValid(final CacheKey other) {
    if (!(other instanceof FileCaching)) {
      return false;

    final FileCaching otherCacheKey =
        (FileCaching) other;
    return this.mTimestamp == otherCacheKey.mTimestamp;

Basically mTimestamp is the last timestamp a file has been modified
(file.lastModified()). I assume that's correct, but it always responds
with the same file even if it changes:

    <map:pipeline jmx-group-name="timestamp-caching">
      <map:match pattern="caching-pipeline/on">
        <map:generate type="cachingttsax" src="test"/>
    <map:pipeline type="async-caching" jmx-group-name="async-caching">
      <map:match pattern="async-caching-pipeline/on">
        <map:generate type="cachingttsax" src="test"/>
        <map:serialize type="xml"/>

Even from within another pipeline.


    <map:pipeline type="noncaching" jmx-group-name="nocaching">
      <map:match pattern="caching-pipeline/off">
        <map:generate type="cachingttsax" src="test"/>
        <map:serialize type="xml"/>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message