aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs38
1 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 7f1c7e9..9e12d948 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache
60 /// User profiles indexed by name 60 /// User profiles indexed by name
61 /// </summary> 61 /// </summary>
62 private readonly Dictionary<string, CachedUserInfo> m_userProfilesByName 62 private readonly Dictionary<string, CachedUserInfo> m_userProfilesByName
63 = new Dictionary<string, CachedUserInfo>(); 63 = new Dictionary<string, CachedUserInfo>();
64 64
65 /// <summary> 65 /// <summary>
66 /// The root library folder. 66 /// The root library folder.
@@ -123,35 +123,35 @@ namespace OpenSim.Framework.Communications.Cache
123 /// <summary> 123 /// <summary>
124 /// Get details of the given user. 124 /// Get details of the given user.
125 /// </summary> 125 /// </summary>
126 /// If the user isn't in cache then the user is requested from the profile service. 126 /// If the user isn't in cache then the user is requested from the profile service.
127 /// <param name="userID"></param> 127 /// <param name="userID"></param>
128 /// <returns>null if no user details are found</returns> 128 /// <returns>null if no user details are found</returns>
129 public CachedUserInfo GetUserDetails(string fname, string lname) 129 public CachedUserInfo GetUserDetails(string fname, string lname)
130 { 130 {
131 lock (m_userProfilesByName) 131 lock (m_userProfilesByName)
132 { 132 {
133 CachedUserInfo userInfo; 133 CachedUserInfo userInfo;
134 134
135 if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo)) 135 if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo))
136 { 136 {
137 return userInfo; 137 return userInfo;
138 } 138 }
139 else 139 else
140 { 140 {
141 UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname); 141 UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname);
142 142
143 if (userProfile != null) 143 if (userProfile != null)
144 return AddToCaches(userProfile); 144 return AddToCaches(userProfile);
145 else 145 else
146 return null; 146 return null;
147 } 147 }
148 } 148 }
149 } 149 }
150 150
151 /// <summary> 151 /// <summary>
152 /// Get details of the given user. 152 /// Get details of the given user.
153 /// </summary> 153 /// </summary>
154 /// If the user isn't in cache then the user is requested from the profile service. 154 /// If the user isn't in cache then the user is requested from the profile service.
155 /// <param name="userID"></param> 155 /// <param name="userID"></param>
156 /// <returns>null if no user details are found</returns> 156 /// <returns>null if no user details are found</returns>
157 public CachedUserInfo GetUserDetails(UUID userID) 157 public CachedUserInfo GetUserDetails(UUID userID)
@@ -185,20 +185,20 @@ namespace OpenSim.Framework.Communications.Cache
185 // probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via 185 // probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via
186 // returning a read only class from the cache). 186 // returning a read only class from the cache).
187// public bool StoreProfile(UserProfileData userProfile) 187// public bool StoreProfile(UserProfileData userProfile)
188// { 188// {
189// lock (m_userProfilesById) 189// lock (m_userProfilesById)
190// { 190// {
191// CachedUserInfo userInfo = GetUserDetails(userProfile.ID); 191// CachedUserInfo userInfo = GetUserDetails(userProfile.ID);
192// 192//
193// if (userInfo != null) 193// if (userInfo != null)
194// { 194// {
195// userInfo.m_userProfile = userProfile; 195// userInfo.m_userProfile = userProfile;
196// m_commsManager.UserService.UpdateUserProfile(userProfile); 196// m_commsManager.UserService.UpdateUserProfile(userProfile);
197// 197//
198// return true; 198// return true;
199// } 199// }
200// } 200// }
201// 201//
202// return false; 202// return false;
203// } 203// }
204 204
@@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Cache
220 } 220 }
221 } 221 }
222 222
223 return createdUserInfo; 223 return createdUserInfo;
224 } 224 }
225 225
226 /// <summary> 226 /// <summary>
@@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications.Cache
234 { 234 {
235 if (m_userProfilesById.ContainsKey(userId)) 235 if (m_userProfilesById.ContainsKey(userId))
236 { 236 {
237 CachedUserInfo userInfo = m_userProfilesById[userId]; 237 CachedUserInfo userInfo = m_userProfilesById[userId];
238 m_userProfilesById.Remove(userId); 238 m_userProfilesById.Remove(userId);
239 239
240 lock (m_userProfilesByName) 240 lock (m_userProfilesByName)
@@ -244,7 +244,7 @@ namespace OpenSim.Framework.Communications.Cache
244 244
245 return true; 245 return true;
246 } 246 }
247 } 247 }
248 248
249 return false; 249 return false;
250 } 250 }