bloritsch 01/05/07 08:50:47
Modified: src/org/apache/cocoon/reading Tag: xml-cocoon2
DatabaseReader.java
Log:
Updated DatabaseReader.
Revision Changes Path
No revision
No revision
1.1.2.18 +7 -1
xml-cocoon/src/org/apache/cocoon/reading/Attic/DatabaseReader.java
Index: DatabaseReader.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/reading/Attic/DatabaseReader.java,v
retrieving revision 1.1.2.17
retrieving revision 1.1.2.18
diff -u -r1.1.2.17 -r1.1.2.18
--- DatabaseReader.java 2001/05/04 20:18:42 1.1.2.17
+++ DatabaseReader.java 2001/05/07 15:50:39 1.1.2.18
@@ -58,6 +58,7 @@
private Connection con = null;
private DataSourceComponent datasource = null;
private boolean doCommit = false;
+ private boolean defaultCache = true;
private ComponentManager manager;
@@ -76,6 +77,7 @@
*/
public void configure(Configuration conf) throws ConfigurationException {
this.dsn = conf.getChild("use-connection").getValue();
+ this.defaultCache =
conf.getChild("invalidate").getValue("never").equals("always");
}
/**
@@ -278,7 +280,11 @@
if (this.lastModified > 0) {
return new TimeStampCacheValidity(this.lastModified);
} else {
- return new NOPCacheValidity();
+ if (this.defaultCache) {
+ return new NOPCacheValidity();
+ } else {
+ return null;
+ }
}
}
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]