Hello all, Included here is a patch to the MRUMemoryStore to fix the problem with the fs store. With this patch, the cached objects are now being written to, read from and removed from the same cache directory.
Index: src/org/apache/cocoon/components/store/MRUMemoryStore.java =================================================================== RCS file: /home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/store/MRUMemoryStore.java,v retrieving revision 1.2.2.5 diff -u -r1.2.2.5 MRUMemoryStore.java --- src/org/apache/cocoon/components/store/MRUMemoryStore.java 2001/07/20 10:27:57 1.2.2.5 +++ src/org/apache/cocoon/components/store/MRUMemoryStore.java 2001/07/22 15:14:18 @@ -232,7 +232,7 @@ tmpstackobject = (TmpStackObject)this.writerstack.pop(); key = tmpstackobject.getKey(); object = tmpstackobject.getObject(); - this.fsstore.store(this.cachedirstr + "/" + URLEncoder.encode(key.toString()),object); + this.fsstore.store(this.cachedirstr + File.separator + +URLEncoder.encode(key.toString()),object); key = null; object = null; tmpstackobject = null; @@ -316,8 +316,9 @@ getLogger().debug("MRUMemoryStore object not found in memory"); /** try to fetch from filesystem */ if(this.filesystem) { - tmpobject = this.fsstore.get(URLEncoder.encode(key.toString())); + tmpobject = this.fsstore.get(this.cachedirstr + File.separator + +URLEncoder.encode(key.toString())); if (tmpobject == null) { + getLogger().debug( "MRUMemoryStore did NOT find object on fs. Looked for: " ++ URLEncoder.encode(key.toString()) ); return null; } else { getLogger().debug("MRUMemoryStore found object on fs"); @@ -347,7 +348,7 @@ getLogger().debug("MRUMemoryStore removing object from store"); this.cache.remove(key); this.mrulist.remove(key); - this.fsstore.remove(URLEncoder.encode(key.toString())); + this.fsstore.remove(this.cachedirstr + File.separator + +URLEncoder.encode(key.toString())); } /** @@ -449,4 +450,4 @@ return this.object; } } -} \ No newline at end of file +}
Rick Tessner [EMAIL PROTECTED] MYRA Systems Corp. Fone: (250) 381 1335 x125 Phax: (250) 381 1304 Cell: (250) 885 9452 "Time grabs you by the wrist, directs you where to go. So make the best of this test and don't ask why.'
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]