vgritsenko    01/07/22 10:58:05

  Modified:    src/org/apache/cocoon/components/store MRUMemoryStore.java
  Log:
  Patch for MRUMemoryStore from Rick Tessner [[EMAIL PROTECTED]]
  
  Revision  Changes    Path
  1.8       +5 -4      
xml-cocoon2/src/org/apache/cocoon/components/store/MRUMemoryStore.java
  
  Index: MRUMemoryStore.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/components/store/MRUMemoryStore.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- MRUMemoryStore.java       2001/07/20 10:27:32     1.7
  +++ MRUMemoryStore.java       2001/07/22 17:58:05     1.8
  @@ -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
  +}
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to