aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs17
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs12
2 files changed, 21 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 025b934..d85eda0 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Framework.Communications.Cache
75 private readonly IList<IInventoryRequest> m_pendingRequests = new List<IInventoryRequest>(); 75 private readonly IList<IInventoryRequest> m_pendingRequests = new List<IInventoryRequest>();
76 76
77 /// <summary> 77 /// <summary>
78 /// The root folder of this user's inventory. Returns null if the inventory has not yet been received. 78 /// The root folder of this user's inventory. Returns null if the root folder has not yet been received.
79 /// </summary> 79 /// </summary>
80 public InventoryFolderImpl RootFolder { get { return m_rootFolder; } } 80 public InventoryFolderImpl RootFolder { get { return m_rootFolder; } }
81 private InventoryFolderImpl m_rootFolder; 81 private InventoryFolderImpl m_rootFolder;
@@ -183,6 +183,21 @@ namespace OpenSim.Framework.Communications.Cache
183 } 183 }
184 } 184 }
185 } 185 }
186
187 /// <summary>
188 /// Drop all cached inventory.
189 /// </summary>
190 public void DropInventory()
191 {
192 // Make sure there aren't pending requests around when we do this
193 // FIXME: There is still a race condition where an inventory operation can be requested (since these aren't being locked).
194 // Will have to extend locking to exclude this very soon.
195 lock (m_pendingRequests)
196 {
197 m_hasReceivedInventory = false;
198 m_rootFolder = null;
199 }
200 }
186 201
187 /// <summary> 202 /// <summary>
188 /// Callback invoked when the inventory is received from an async request to the inventory service 203 /// Callback invoked when the inventory is received from an async request to the inventory service
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index ac52535..5045c97 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -118,21 +118,19 @@ namespace OpenSim.Framework.Communications.Cache
118 /// </summary> 118 /// </summary>
119 /// <param name="userID"></param> 119 /// <param name="userID"></param>
120 /// <returns>true if the user was successfully removed, false otherwise</returns> 120 /// <returns>true if the user was successfully removed, false otherwise</returns>
121 public bool RemoveUser(LLUUID userID) 121 public bool RemoveUser(LLUUID userId)
122 { 122 {
123 lock (m_userProfiles) 123 lock (m_userProfiles)
124 { 124 {
125 if (m_userProfiles.ContainsKey(userID)) 125 if (m_userProfiles.ContainsKey(userId))
126 { 126 {
127 m_userProfiles.Remove(userID); 127 m_log.DebugFormat("[USER CACHE]: Removing user {0}", userId);
128 m_userProfiles.Remove(userId);
128 return true; 129 return true;
129 } 130 }
130 else
131 {
132 m_log.ErrorFormat("[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userID);
133 }
134 } 131 }
135 132
133 m_log.ErrorFormat("[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userId);
136 return false; 134 return false;
137 } 135 }
138 136