diff options
author | John Hurliman | 2010-09-07 14:41:13 -0700 |
---|---|---|
committer | John Hurliman | 2010-09-07 14:41:13 -0700 |
commit | 9be1c0ff448d4ea650ca921937905653b4017d61 (patch) | |
tree | 845b09cb064fb023993b559671ec22d4678d8c1b /OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-9be1c0ff448d4ea650ca921937905653b4017d61.zip opensim-SC_OLD-9be1c0ff448d4ea650ca921937905653b4017d61.tar.gz opensim-SC_OLD-9be1c0ff448d4ea650ca921937905653b4017d61.tar.bz2 opensim-SC_OLD-9be1c0ff448d4ea650ca921937905653b4017d61.tar.xz |
* Cache null account responses in the SimianUserAccountServiceConnector to avoid repeated requests for missing avatar IDs
* Updated to OpenMetaverse r3442 to fix a timezone issue with ExpiringCache
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs index e1bc243..e7cfda1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
36 | { | 36 | { |
37 | public class UserAccountCache | 37 | public class UserAccountCache |
38 | { | 38 | { |
39 | private const double CACHE_EXPIRATION_SECONDS = 120.0; | ||
40 | |||
39 | private static readonly ILog m_log = | 41 | private static readonly ILog m_log = |
40 | LogManager.GetLogger( | 42 | LogManager.GetLogger( |
41 | MethodBase.GetCurrentMethod().DeclaringType); | 43 | MethodBase.GetCurrentMethod().DeclaringType); |
@@ -51,9 +53,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
51 | public void Cache(UUID userID, UserAccount account) | 53 | public void Cache(UUID userID, UserAccount account) |
52 | { | 54 | { |
53 | // Cache even null accounts | 55 | // Cache even null accounts |
54 | m_UUIDCache.AddOrUpdate(userID, account, DateTime.Now + TimeSpan.FromMinutes(2.0d)); | 56 | m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS); |
55 | if (account != null) | 57 | if (account != null) |
56 | m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromMinutes(2.0d)); | 58 | m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_EXPIRATION_SECONDS); |
57 | 59 | ||
58 | m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); | 60 | m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); |
59 | } | 61 | } |