db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/cache MaterializationCache.java
Date Fri, 18 Mar 2005 20:32:04 GMT
arminw      2005/03/18 12:32:04

  Modified:    src/java/org/apache/ojb/broker/cache Tag: OJB_1_0_RELEASE
                        MaterializationCache.java
  Log:
  allow caching of new object when cache is enabled
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.3   +8 -6      db-ojb/src/java/org/apache/ojb/broker/cache/Attic/MaterializationCache.java
  
  Index: MaterializationCache.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/cache/Attic/MaterializationCache.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- MaterializationCache.java	4 Mar 2005 18:07:23 -0000	1.1.2.2
  +++ MaterializationCache.java	18 Mar 2005 20:32:04 -0000	1.1.2.3
  @@ -123,7 +123,12 @@
        */ 
       public boolean cacheIfNew(Identity oid, Object obj)
       {
  -        return cacheDistributor.cacheIfNew(oid, obj);
  +        boolean result = cacheDistributor.cacheIfNew(oid, obj);
  +        if(enabledReadCache)
  +        {
  +            doLocalCache(oid, obj, TYPE_CACHED_READ);
  +        }
  +        return result;
       }
   
       public Object lookup(Identity oid)
  @@ -148,10 +153,7 @@
   
       public void remove(Identity oid)
       {
  -        if(enabledReadCache)
  -        {
  -            doLocalRemove(oid);
  -        }
  +        doLocalRemove(oid);
           cacheDistributor.remove(oid);
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message