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 | |
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 '')
3 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 9eaa758..5255d30 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -252,7 +252,7 @@ namespace Flotsam.RegionModules.AssetCache | |||
252 | } | 252 | } |
253 | else | 253 | else |
254 | { | 254 | { |
255 | m_MemoryCache.AddOrUpdate(key, asset, DateTime.MaxValue); | 255 | m_MemoryCache.AddOrUpdate(key, asset, Double.MaxValue); |
256 | } | 256 | } |
257 | } | 257 | } |
258 | } | 258 | } |
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 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 58698ee..0f08408 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -48,6 +48,7 @@ using OpenSim.Tests.Common.Setup; | |||
48 | using ArchiveConstants = OpenSim.Framework.Serialization.ArchiveConstants; | 48 | using ArchiveConstants = OpenSim.Framework.Serialization.ArchiveConstants; |
49 | using TarArchiveReader = OpenSim.Framework.Serialization.TarArchiveReader; | 49 | using TarArchiveReader = OpenSim.Framework.Serialization.TarArchiveReader; |
50 | using TarArchiveWriter = OpenSim.Framework.Serialization.TarArchiveWriter; | 50 | using TarArchiveWriter = OpenSim.Framework.Serialization.TarArchiveWriter; |
51 | using RegionSettings = OpenSim.Framework.RegionSettings; | ||
51 | 52 | ||
52 | namespace OpenSim.Region.CoreModules.World.Archiver.Tests | 53 | namespace OpenSim.Region.CoreModules.World.Archiver.Tests |
53 | { | 54 | { |
@@ -135,7 +136,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
135 | 136 | ||
136 | SceneObjectPart part2 = CreateSceneObjectPart2(); | 137 | SceneObjectPart part2 = CreateSceneObjectPart2(); |
137 | 138 | ||
138 | AssetNotecard nc = new AssetNotecard("Hello World!"); | 139 | AssetNotecard nc = new AssetNotecard(); |
140 | nc.BodyText = "Hello World!"; | ||
141 | nc.Encode(); | ||
139 | UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); | 142 | UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); |
140 | UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); | 143 | UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); |
141 | AssetBase ncAsset | 144 | AssetBase ncAsset |