Author: agilliland
Date: Tue Apr 18 20:08:30 2006
New Revision: 395117

URL: http://svn.apache.org/viewcvs?rev=395117&view=rev
Log:
make sure our L3 cache mappings are invalidated if the object is removed.


Modified:
    
incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateUserManagerImpl.java

Modified: 
incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateUserManagerImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateUserManagerImpl.java?rev=395117&r1=395116&r2=395117&view=diff
==============================================================================
--- 
incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateUserManagerImpl.java
 (original)
+++ 
incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateUserManagerImpl.java
 Tue Apr 18 20:08:30 2006
@@ -72,21 +72,14 @@
     }
     
     
-    public void removeWebsite(String id) throws RollerException {
-        
-        // load the weblog first
-        WebsiteData weblog = (WebsiteData) this.strategy.load(id, 
WebsiteData.class);
-        
-        // remove it
-        this.removeWebsite(weblog);
-    }
-    
-    
     public void removeWebsite(WebsiteData weblog) throws RollerException {
         
         // remove contents first, then remove website
         this.removeWebsiteContents(weblog);
         this.strategy.remove(weblog);
+        
+        // remove entry from cache mapping
+        this.weblogHandleToIdMap.remove(weblog.getHandle());
     }
     
 
@@ -183,11 +176,9 @@
     
     public void removeUser(UserData user) throws RollerException {
         this.strategy.remove(user);
-    }
-    
-    
-    public void removeUser(String id) throws RollerException {
-        this.strategy.remove(id,UserData.class);
+        
+        // remove entry from cache mapping
+        this.userNameToIdMap.remove(user.getUserName());
     }
     
     


Reply via email to