cziegeler 2004/04/15 01:04:39
Modified: src/blocks/scratchpad/java/org/apache/cocoon/caching
SimpleCacheKey.java SimpleCache.java
Log:
Javadoc updates
Revision Changes Path
1.3 +12 -10
cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/caching/SimpleCacheKey.java
Index: SimpleCacheKey.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/caching/SimpleCacheKey.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SimpleCacheKey.java 5 Mar 2004 10:07:25 -0000 1.2
+++ SimpleCacheKey.java 15 Apr 2004 08:04:39 -0000 1.3
@@ -18,21 +18,23 @@
import java.io.Serializable;
/**
- * This is the cache key for one pipeline (or the first part of a pipeline).
- * It consists of one or more [EMAIL PROTECTED] ComponentCacheKey}s.
+ * This is a "simple" cache key that does not consider the components used
in the
+ * pipeline. It simply consists of a key (unique identifier for the request)
and
+ * a boolean value that defines if the key is for a complete pipeline call or
+ * for an internal pipeline call.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
* @version CVS $Id$
* @since 2.1.1
*/
public class SimpleCacheKey
- implements Serializable {
+ implements Serializable {
/** The key */
final protected String key;
- /** the hash code */
- final protected boolean complete;
+ /** Is this an external pipeline call? */
+ final protected boolean external;
/** cache key */
final protected String cacheKey;
@@ -43,11 +45,11 @@
/**
* Constructor
*/
- public SimpleCacheKey(String key, boolean complete) {
+ public SimpleCacheKey(String key, boolean external) {
this.key = key;
- this.complete = complete;
+ this.external = external;
final StringBuffer buf = new StringBuffer();
- buf.append(complete).append(':').append(this.key);
+ buf.append(this.external).append(':').append(this.key);
this.cacheKey = buf.toString();
}
@@ -57,7 +59,7 @@
public boolean equals(Object object) {
if (object instanceof SimpleCacheKey) {
SimpleCacheKey pck = (SimpleCacheKey)object;
- return ( this.cacheKey.equals( pck.cacheKey ) );
+ return this.cacheKey.equals( pck.cacheKey );
}
return false;
}
1.3 +5 -2
cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/caching/SimpleCache.java
Index: SimpleCache.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/caching/SimpleCache.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SimpleCache.java 5 Mar 2004 10:07:25 -0000 1.2
+++ SimpleCache.java 15 Apr 2004 08:04:39 -0000 1.3
@@ -37,7 +37,10 @@
import org.apache.excalibur.source.impl.validity.FileTimeStampValidity;
/**
- * A simple cache implementation
+ * This cache implementation is an extension to the default cache
implementation.
+ * If a response is not found in the cache or is invalid, it also checks the
+ * file system for a cached response. This allows to update the cache
information
+ * by running batch processes.
*
* @since 2.1.1
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>