You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by re...@apache.org on 2008/04/01 11:17:53 UTC

svn commit: r643330 - in /cocoon/whiteboard/corona/trunk/corona-core/src: main/java/org/apache/cocoon/corona/pipeline/ main/java/org/apache/cocoon/corona/pipeline/caching/ main/java/org/apache/cocoon/corona/pipeline/component/ main/java/org/apache/coco...

Author: reinhard
Date: Tue Apr  1 02:17:09 2008
New Revision: 643330

URL: http://svn.apache.org/viewvc?rev=643330&view=rev
Log:
. apply COCOON-2190 (by Steven Dolg)
. add constructor methods to InvocationImpl

Added:
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheKey.java   (with props)
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheValue.java   (with props)
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CachingOutputStream.java   (with props)
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompleteCacheValue.java   (with props)
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompoundCacheKey.java   (with props)
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/PipelineCache.java   (with props)
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimpleCacheKey.java   (with props)
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimplePipelineCache.java   (with props)
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/TimestampCacheKey.java   (with props)
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/CachingPipelineComponent.java   (with props)
Modified:
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/XMLSerializer.java
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/InvocationImpl.java
    cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline.xml
    cocoon/whiteboard/corona/trunk/corona-core/src/test/java/org/apache/cocoon/corona/pipeline/PipelineTest.java

Modified: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java?rev=643330&r1=643329&r2=643330&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java (original)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java Tue Apr  1 02:17:09 2008
@@ -76,6 +76,10 @@
         starter.execute(invocation);
     }
 
+    protected LinkedList<PipelineComponent> getComponents() {
+        return this.components;
+    }
+
     protected void setupComponents(Invocation invocation) {
         PipelineComponent first = this.components.getFirst();
 

Modified: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java?rev=643330&r1=643329&r2=643330&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java (original)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java Tue Apr  1 02:17:09 2008
@@ -18,6 +18,71 @@
  */
 package org.apache.cocoon.corona.pipeline;
 
+import org.apache.cocoon.corona.pipeline.caching.CachingOutputStream;
+import org.apache.cocoon.corona.pipeline.caching.CompleteCacheValue;
+import org.apache.cocoon.corona.pipeline.caching.CompoundCacheKey;
+import org.apache.cocoon.corona.pipeline.caching.PipelineCache;
+import org.apache.cocoon.corona.pipeline.caching.CacheKey;
+import org.apache.cocoon.corona.pipeline.caching.CacheValue;
+import org.apache.cocoon.corona.pipeline.component.CachingPipelineComponent;
+import org.apache.cocoon.corona.pipeline.component.PipelineComponent;
+import org.apache.cocoon.corona.sitemap.Invocation;
+
 public class CachingPipeline extends AbstractPipeline {
 
+    private PipelineCache pipelineCache;
+
+    @Override
+    public void execute(Invocation invocation) throws Exception {
+        // construct the current cache key
+        CacheKey cacheKey = this.constructCacheKey(invocation);
+
+        // checked for a cached value first
+        CacheValue cachedValue = this.getCachedValue(cacheKey);
+        if (cachedValue != null) {
+            // cached value found
+            cachedValue.writeTo(invocation.getOutputStream());
+            return;
+        }
+
+        // create a caching output stream to intercept the result
+        CachingOutputStream cachingOutputStream = new CachingOutputStream(invocation.getOutputStream());
+        invocation.setOutputStream(cachingOutputStream);
+        // execute the pipeline
+        super.execute(invocation);
+        // reset the output stream
+        invocation.setOutputStream(cachingOutputStream.getOutputStream());
+
+        this.pipelineCache.put(cacheKey, new CompleteCacheValue(cachingOutputStream.getContent()));
+    }
+
+    public void setPipelineCache(PipelineCache pipelineCache) {
+        this.pipelineCache = pipelineCache;
+    }
+
+    private CacheKey constructCacheKey(Invocation invocation) {
+        CompoundCacheKey result = new CompoundCacheKey();
+
+        for (PipelineComponent pipelineComponent : this.getComponents()) {
+            if (pipelineComponent instanceof CachingPipelineComponent) {
+                CachingPipelineComponent cachablePipelineComponent = (CachingPipelineComponent) pipelineComponent;
+
+                result.addCacheKey(cachablePipelineComponent.constructCacheKey(invocation));
+                continue;
+            }
+
+            // component does not support caching
+            return null;
+        }
+
+        return result;
+    }
+
+    private CacheValue getCachedValue(CacheKey cacheKey) {
+        if (cacheKey == null) {
+            return null;
+        }
+
+        return this.pipelineCache.get(cacheKey);
+    }
 }

Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheKey.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheKey.java?rev=643330&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheKey.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheKey.java Tue Apr  1 02:17:09 2008
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.corona.pipeline.caching;
+
+public interface CacheKey {
+
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheKey.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheKey.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheValue.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheValue.java?rev=643330&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheValue.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheValue.java Tue Apr  1 02:17:09 2008
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.corona.pipeline.caching;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface CacheValue {
+
+    void writeTo(OutputStream outputStream) throws IOException;
+
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheValue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheValue.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CacheValue.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CachingOutputStream.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CachingOutputStream.java?rev=643330&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CachingOutputStream.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CachingOutputStream.java Tue Apr  1 02:17:09 2008
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.corona.pipeline.caching;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public class CachingOutputStream extends OutputStream {
+
+    private byte[] buffer;
+    private int length;
+    private OutputStream outputStream;
+
+    public CachingOutputStream(OutputStream outputStream) {
+        super();
+
+        this.outputStream = outputStream;
+        this.buffer = new byte[1024];
+        this.length = 0;
+    }
+
+    @Override
+    public void close() throws IOException {
+        this.outputStream.close();
+    }
+
+    @Override
+    public void flush() throws IOException {
+        this.outputStream.flush();
+    }
+
+    public byte[] getContent() {
+        byte[] result = new byte[this.length];
+        System.arraycopy(this.buffer, 0, result, 0, this.length);
+        return result;
+    }
+
+    public OutputStream getOutputStream() {
+        return this.outputStream;
+    }
+
+    @Override
+    public void write(byte[] b, int off, int len) throws IOException {
+        this.outputStream.write(b, off, len);
+
+        if (this.length + len >= this.buffer.length) {
+            byte[] nextBuffer = new byte[this.length + len + 1024];
+            System.arraycopy(this.buffer, 0, nextBuffer, 0, this.buffer.length);
+            this.buffer = nextBuffer;
+        }
+
+        System.arraycopy(b, off, this.buffer, this.length, len);
+        this.length += len;
+    }
+
+    @Override
+    public void write(int b) throws IOException {
+        this.outputStream.write(b);
+
+        if (this.length + 1 == this.buffer.length) {
+            byte[] nextBuffer = new byte[this.buffer.length + 1024];
+            System.arraycopy(this.buffer, 0, nextBuffer, 0, this.buffer.length);
+            this.buffer = nextBuffer;
+        }
+
+        this.buffer[this.length] = (byte) b;
+        this.length++;
+    }
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CachingOutputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CachingOutputStream.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CachingOutputStream.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompleteCacheValue.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompleteCacheValue.java?rev=643330&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompleteCacheValue.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompleteCacheValue.java Tue Apr  1 02:17:09 2008
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.corona.pipeline.caching;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public class CompleteCacheValue implements CacheValue {
+
+    private final byte[] content;
+
+    public CompleteCacheValue(byte[] content) {
+        super();
+
+        this.content = content;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see org.apache.cocoon.corona.pipeline.caching.CacheValue#writeTo(java.io.OutputStream)
+     */
+    public void writeTo(OutputStream outputStream) throws IOException {
+        outputStream.write(this.content);
+    }
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompleteCacheValue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompleteCacheValue.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompleteCacheValue.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompoundCacheKey.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompoundCacheKey.java?rev=643330&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompoundCacheKey.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompoundCacheKey.java Tue Apr  1 02:17:09 2008
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.corona.pipeline.caching;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+public class CompoundCacheKey implements CacheKey {
+
+    private List<CacheKey> cacheKeys = new LinkedList<CacheKey>();
+
+    public void addCacheKey(CacheKey cacheKey) {
+        this.cacheKeys.add(cacheKey);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof CompoundCacheKey)) {
+            return false;
+        }
+
+        CompoundCacheKey other = (CompoundCacheKey) obj;
+        if (this.cacheKeys.size() != other.cacheKeys.size()) {
+            return false;
+        }
+
+        Iterator<CacheKey> myIterator = this.cacheKeys.iterator();
+        Iterator<CacheKey> otherIterator = other.cacheKeys.iterator();
+
+        while (myIterator.hasNext()) {
+            CacheKey myCacheKey = myIterator.next();
+            CacheKey otherCacheKey = otherIterator.next();
+
+            if (myCacheKey == null || !myCacheKey.equals(otherCacheKey)) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = 1;
+
+        for (CacheKey cacheKey : this.cacheKeys) {
+            result = 31 * result + cacheKey.hashCode();
+        }
+
+        return result;
+    }
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompoundCacheKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompoundCacheKey.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/CompoundCacheKey.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/PipelineCache.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/PipelineCache.java?rev=643330&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/PipelineCache.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/PipelineCache.java Tue Apr  1 02:17:09 2008
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.corona.pipeline.caching;
+
+public interface PipelineCache {
+
+    void put(CacheKey pipelineCacheKey, CacheValue pipelineCacheValue);
+
+    CacheValue get(CacheKey currentPipelineCacheKey);
+
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/PipelineCache.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/PipelineCache.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/PipelineCache.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimpleCacheKey.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimpleCacheKey.java?rev=643330&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimpleCacheKey.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimpleCacheKey.java Tue Apr  1 02:17:09 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.corona.pipeline.caching;
+
+public class SimpleCacheKey implements CacheKey {
+
+    @Override
+    public boolean equals(Object obj) {
+        return obj instanceof SimpleCacheKey;
+    }
+
+    @Override
+    public int hashCode() {
+        return this.getClass().hashCode();
+    }
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimpleCacheKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimpleCacheKey.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimpleCacheKey.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimplePipelineCache.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimplePipelineCache.java?rev=643330&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimplePipelineCache.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimplePipelineCache.java Tue Apr  1 02:17:09 2008
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.corona.pipeline.caching;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class SimplePipelineCache implements PipelineCache {
+
+    private Map<CacheKey, CacheValue> map = new HashMap<CacheKey, CacheValue>();
+
+    public CacheValue get(CacheKey pipelineCacheKey) {
+        return this.map.get(pipelineCacheKey);
+    }
+
+    public void put(CacheKey pipelineCacheKey, CacheValue pipelineCacheValue) {
+        this.map.put(pipelineCacheKey, pipelineCacheValue);
+    }
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimplePipelineCache.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimplePipelineCache.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/SimplePipelineCache.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/TimestampCacheKey.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/TimestampCacheKey.java?rev=643330&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/TimestampCacheKey.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/TimestampCacheKey.java Tue Apr  1 02:17:09 2008
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.corona.pipeline.caching;
+
+import java.net.URL;
+
+public class TimestampCacheKey implements CacheKey {
+
+    private final long timestamp;
+    private final URL url;
+
+    public TimestampCacheKey(URL url, long timestamp) {
+        super();
+
+        this.url = url;
+        this.timestamp = timestamp;
+    }
+
+    public long getTimestamp() {
+        return this.timestamp;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof TimestampCacheKey)) {
+            return false;
+        }
+
+        TimestampCacheKey other = (TimestampCacheKey) obj;
+        return this.timestamp == other.timestamp && this.url.equals(other.url);
+    }
+
+    @Override
+    public int hashCode() {
+        return (int) (this.timestamp ^ this.timestamp >>> 32);
+    }
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/TimestampCacheKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/TimestampCacheKey.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/caching/TimestampCacheKey.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/CachingPipelineComponent.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/CachingPipelineComponent.java?rev=643330&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/CachingPipelineComponent.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/CachingPipelineComponent.java Tue Apr  1 02:17:09 2008
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.corona.pipeline.component;
+
+import org.apache.cocoon.corona.pipeline.caching.CacheKey;
+import org.apache.cocoon.corona.sitemap.Invocation;
+
+public interface CachingPipelineComponent {
+
+    CacheKey constructCacheKey(Invocation invocation);
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/CachingPipelineComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/CachingPipelineComponent.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/CachingPipelineComponent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java?rev=643330&r1=643329&r2=643330&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java (original)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java Tue Apr  1 02:17:09 2008
@@ -19,18 +19,38 @@
 package org.apache.cocoon.corona.pipeline.component;
 
 import java.io.BufferedInputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 import java.util.Map;
 
+import org.apache.cocoon.corona.pipeline.caching.CacheKey;
+import org.apache.cocoon.corona.pipeline.caching.TimestampCacheKey;
 import org.apache.cocoon.corona.sitemap.Invocation;
 import org.xml.sax.InputSource;
 import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.XMLReaderFactory;
 
-public class FileGenerator extends AbstractXMLProducer implements Starter {
+public class FileGenerator extends AbstractXMLProducer implements Starter, CachingPipelineComponent {
 
     private String src;
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see org.apache.cocoon.corona.pipeline.component.CachingPipelineComponent#constructCacheKey(org.apache.cocoon.corona.sitemap.Invocation)
+     */
+    public CacheKey constructCacheKey(Invocation invocation) {
+        URL url = invocation.resolve(this.src);
+        try {
+            return new TimestampCacheKey(url, url.openConnection().getLastModified());
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+
+        return null;
+    }
 
     /**
      * {@inheritDoc}

Modified: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java?rev=643330&r1=643329&r2=643330&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java (original)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java Tue Apr  1 02:17:09 2008
@@ -24,13 +24,26 @@
 import java.net.URL;
 import java.util.Map;
 
+import org.apache.cocoon.corona.pipeline.caching.CacheKey;
+import org.apache.cocoon.corona.pipeline.caching.TimestampCacheKey;
 import org.apache.cocoon.corona.sitemap.Invocation;
 
-public class FileReaderComponent implements Starter, Finisher {
+public class FileReaderComponent implements Starter, Finisher, CachingPipelineComponent {
 
+    private OutputStream outputStream;
     private String src;
 
-    private OutputStream outputStream;
+    public CacheKey constructCacheKey(Invocation invocation) {
+        URL url = invocation.resolve(this.src);
+        try {
+            return new TimestampCacheKey(url, url.openConnection().getLastModified());
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+
+        return null;
+    }
 
     /**
      * {@inheritDoc}

Modified: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/XMLSerializer.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/XMLSerializer.java?rev=643330&r1=643329&r2=643330&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/XMLSerializer.java (original)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/XMLSerializer.java Tue Apr  1 02:17:09 2008
@@ -29,14 +29,16 @@
 import javax.xml.transform.sax.TransformerHandler;
 import javax.xml.transform.stream.StreamResult;
 
+import org.apache.cocoon.corona.pipeline.caching.CacheKey;
+import org.apache.cocoon.corona.pipeline.caching.SimpleCacheKey;
+import org.apache.cocoon.corona.sitemap.Invocation;
 import org.xml.sax.Attributes;
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
 
-public class XMLSerializer implements XMLConsumer, Finisher {
+public class XMLSerializer implements XMLConsumer, Finisher, CachingPipelineComponent {
 
-    private static final SAXTransformerFactory SAX_TRANSFORMER_FACTORY = (SAXTransformerFactory) TransformerFactory
-            .newInstance();
+    private static final SAXTransformerFactory SAX_TRANSFORMER_FACTORY = (SAXTransformerFactory) TransformerFactory.newInstance();
 
     private Properties format = new Properties();
 
@@ -48,6 +50,10 @@
 
     public void comment(char[] ch, int start, int length) throws SAXException {
         this.transformerHandler.comment(ch, start, length);
+    }
+
+    public CacheKey constructCacheKey(Invocation invocation) {
+        return new SimpleCacheKey();
     }
 
     public void endCDATA() throws SAXException {

Modified: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/InvocationImpl.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/InvocationImpl.java?rev=643330&r1=643329&r2=643330&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/InvocationImpl.java (original)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/InvocationImpl.java Tue Apr  1 02:17:09 2008
@@ -49,8 +49,44 @@
     private Throwable throwable;
 
     /**
+     * Create a {@link InvocationImpl} object using the given output stream.
+     *
+     * @param outputStream   The {@link OutputStream} where the result is writen to.
+     */
+    public InvocationImpl(OutputStream outputStream) {
+        super();
+        this.outputStream = outputStream;
+    }
+
+    /**
+     * Create a {@link InvocationImpl} object using the given output stream and requestURI.
+     *
+     * @param outputStream   The {@link OutputStream} where the result is writen to.
+     * @param requestURI     The requested path.
+     */
+    public InvocationImpl(OutputStream outputStream, String requestURI) {
+        super();
+        this.outputStream = outputStream;
+        this.requestURI = requestURI;
+    }
+
+    /**
+     * Create a {@link InvocationImpl} object using the given output stream, requestURI and parameters.
+     *
+     * @param outputStream   The {@link OutputStream} where the result is writen to.
+     * @param requestURI     The requested path.
+     * @param parameters     A {@link Map} of parameters that are used when the pipeline is being executed.
+     */
+    public InvocationImpl(OutputStream outputStream, String requestURI, Map<String, Object> parameters) {
+        super();
+        this.outputStream = outputStream;
+        this.requestURI = requestURI;
+        this.parameters = parameters;
+    }
+
+    /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#addParameter(java.lang.String,
      *      java.lang.Object)
      */
@@ -64,7 +100,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#execute()
      */
     public void execute() throws Exception {
@@ -77,7 +113,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#getOutputStream()
      */
     public OutputStream getOutputStream() {
@@ -86,7 +122,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#getParameter(java.lang.String)
      */
     public Object getParameter(String name) {
@@ -98,7 +134,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#getParameters()
      */
     public Map<String, Object> getParameters() {
@@ -107,7 +143,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#getRequestURI()
      */
     public String getRequestURI() {
@@ -120,7 +156,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#getThrowable()
      */
     public Throwable getThrowable() {
@@ -129,7 +165,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#installAction(java.lang.String)
      */
     public void installAction(String type) {
@@ -143,7 +179,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#installComponent(java.lang.String,
      *      java.util.Map)
      */
@@ -160,7 +196,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#installPipeline(java.lang.String)
      */
     public void installPipeline(String type) {
@@ -169,7 +205,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#isErrorInvocation()
      */
     public boolean isErrorInvocation() {
@@ -178,7 +214,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#popSitemapParameters()
      */
     public void popSitemapParameters() {
@@ -187,7 +223,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#pushSitemapParameters(java.lang.String,
      *      java.util.Map)
      */
@@ -197,7 +233,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#resolve(java.lang.String)
      */
     public URL resolve(String resource) {
@@ -210,7 +246,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#setOutputStream(java.io.OutputStream)
      */
     public void setOutputStream(OutputStream outputStream) {
@@ -219,7 +255,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#setParameters(java.util.Map)
      */
     public void setParameters(Map<String, Object> parameters) {
@@ -232,7 +268,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.Invocation#setThrowable(java.lang.Throwable)
      */
     public void setThrowable(Throwable throwable) {

Modified: cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline.xml?rev=643330&r1=643329&r2=643330&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline.xml (original)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline.xml Tue Apr  1 02:17:09 2008
@@ -21,21 +21,14 @@
 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
 
-  <!--
-    <bean name="org.apache.cocoon.corona.pipeline.PipelineFactory" class="org.apache.cocoon.corona.pipeline.ReflectionPipelineFactory">
-    <property name="types">
-    <map>
-    <entry key="pipeline:caching" value="org.apache.cocoon.corona.pipeline.CachingPipeline" />
-    <entry key="pipeline:noncaching" value="org.apache.cocoon.corona.pipeline.NonCachingPipeline" />
-    </map>
-    </property>
-    </bean>
-  -->
-
   <bean name="org.apache.cocoon.corona.pipeline.PipelineFactory" class="org.apache.cocoon.corona.pipeline.PrototypePipelineFactory" />
 
-  <bean name="pipeline:caching" class="org.apache.cocoon.corona.pipeline.CachingPipeline" scope="prototype" />
+  <bean name="pipeline:caching" class="org.apache.cocoon.corona.pipeline.CachingPipeline" scope="prototype">
+    <property name="pipelineCache" ref="pipelineCache" />
+  </bean>
 
   <bean name="pipeline:noncaching" class="org.apache.cocoon.corona.pipeline.NonCachingPipeline" scope="prototype" />
+
+  <bean name="pipelineCache" class="org.apache.cocoon.corona.pipeline.caching.SimplePipelineCache" />
 
 </beans>

Modified: cocoon/whiteboard/corona/trunk/corona-core/src/test/java/org/apache/cocoon/corona/pipeline/PipelineTest.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/test/java/org/apache/cocoon/corona/pipeline/PipelineTest.java?rev=643330&r1=643329&r2=643330&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/test/java/org/apache/cocoon/corona/pipeline/PipelineTest.java (original)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/test/java/org/apache/cocoon/corona/pipeline/PipelineTest.java Tue Apr  1 02:17:09 2008
@@ -43,8 +43,7 @@
         fileReaderComponent.setParameters(parameters);
         pipeline.addComponent(fileReaderComponent);
 
-        InvocationImpl invocationImpl = new InvocationImpl();
-        invocationImpl.setOutputStream(System.out);
+        InvocationImpl invocationImpl = new InvocationImpl(System.out);
 
         SpringComponentProvider componentProviderImpl = new SpringComponentProvider();
         componentProviderImpl.setResourceResolver(new ClassPathResourceResolver());