diff options
author | Melanie | 2011-02-27 19:47:37 +0000 |
---|---|---|
committer | Melanie | 2011-02-27 19:47:37 +0000 |
commit | 9b277b372be4e1071c02f87a53cb70a4324d77fa (patch) | |
tree | 35183674cbacc79f2931a9cc11f747974fff845b /OpenSim/Region/CoreModules | |
parent | Fix a few little things (diff) | |
parent | change some log messages from info to debug (diff) | |
download | opensim-SC_OLD-9b277b372be4e1071c02f87a53cb70a4324d77fa.zip opensim-SC_OLD-9b277b372be4e1071c02f87a53cb70a4324d77fa.tar.gz opensim-SC_OLD-9b277b372be4e1071c02f87a53cb70a4324d77fa.tar.bz2 opensim-SC_OLD-9b277b372be4e1071c02f87a53cb70a4324d77fa.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 2 |
2 files changed, 7 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index e542d7d..7cba702 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -92,9 +92,9 @@ namespace Flotsam.RegionModules.AssetCache | |||
92 | // Expiration is expressed in hours. | 92 | // Expiration is expressed in hours. |
93 | private const double m_DefaultMemoryExpiration = 1.0; | 93 | private const double m_DefaultMemoryExpiration = 1.0; |
94 | private const double m_DefaultFileExpiration = 48; | 94 | private const double m_DefaultFileExpiration = 48; |
95 | private TimeSpan m_MemoryExpiration = TimeSpan.Zero; | 95 | private TimeSpan m_MemoryExpiration = TimeSpan.FromHours(m_DefaultMemoryExpiration); |
96 | private TimeSpan m_FileExpiration = TimeSpan.Zero; | 96 | private TimeSpan m_FileExpiration = TimeSpan.FromHours(m_DefaultFileExpiration); |
97 | private TimeSpan m_FileExpirationCleanupTimer = TimeSpan.Zero; | 97 | private TimeSpan m_FileExpirationCleanupTimer = TimeSpan.FromHours(m_DefaultFileExpiration); |
98 | 98 | ||
99 | private static int m_CacheDirectoryTiers = 1; | 99 | private static int m_CacheDirectoryTiers = 1; |
100 | private static int m_CacheDirectoryTierLen = 3; | 100 | private static int m_CacheDirectoryTierLen = 3; |
@@ -147,7 +147,7 @@ namespace Flotsam.RegionModules.AssetCache | |||
147 | } | 147 | } |
148 | 148 | ||
149 | m_CacheDirectory = assetConfig.GetString("CacheDirectory", m_DefaultCacheDirectory); | 149 | m_CacheDirectory = assetConfig.GetString("CacheDirectory", m_DefaultCacheDirectory); |
150 | m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Cache Directory", m_DefaultCacheDirectory); | 150 | m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Cache Directory", m_CacheDirectory); |
151 | 151 | ||
152 | m_MemoryCacheEnabled = assetConfig.GetBoolean("MemoryCacheEnabled", false); | 152 | m_MemoryCacheEnabled = assetConfig.GetBoolean("MemoryCacheEnabled", false); |
153 | m_MemoryExpiration = TimeSpan.FromHours(assetConfig.GetDouble("MemoryCacheTimeout", m_DefaultMemoryExpiration)); | 153 | m_MemoryExpiration = TimeSpan.FromHours(assetConfig.GetDouble("MemoryCacheTimeout", m_DefaultMemoryExpiration)); |
@@ -245,16 +245,7 @@ namespace Flotsam.RegionModules.AssetCache | |||
245 | private void UpdateMemoryCache(string key, AssetBase asset) | 245 | private void UpdateMemoryCache(string key, AssetBase asset) |
246 | { | 246 | { |
247 | if (m_MemoryCacheEnabled) | 247 | if (m_MemoryCacheEnabled) |
248 | { | 248 | m_MemoryCache.AddOrUpdate(key, asset, m_MemoryExpiration); |
249 | if (m_MemoryExpiration > TimeSpan.Zero) | ||
250 | { | ||
251 | m_MemoryCache.AddOrUpdate(key, asset, m_MemoryExpiration); | ||
252 | } | ||
253 | else | ||
254 | { | ||
255 | m_MemoryCache.AddOrUpdate(key, asset, Double.MaxValue); | ||
256 | } | ||
257 | } | ||
258 | } | 249 | } |
259 | 250 | ||
260 | public void Cache(AssetBase asset) | 251 | public void Cache(AssetBase asset) |
@@ -459,7 +450,7 @@ namespace Flotsam.RegionModules.AssetCache | |||
459 | private void CleanupExpiredFiles(object source, ElapsedEventArgs e) | 450 | private void CleanupExpiredFiles(object source, ElapsedEventArgs e) |
460 | { | 451 | { |
461 | if (m_LogLevel >= 2) | 452 | if (m_LogLevel >= 2) |
462 | m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Checking for expired files older then {0}.", m_FileExpiration.ToString()); | 453 | m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Checking for expired files older then {0}.", m_FileExpiration); |
463 | 454 | ||
464 | // Purge all files last accessed prior to this point | 455 | // Purge all files last accessed prior to this point |
465 | DateTime purgeLine = DateTime.Now - m_FileExpiration; | 456 | DateTime purgeLine = DateTime.Now - m_FileExpiration; |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index f8ce444..08ac624 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
167 | } | 167 | } |
168 | } | 168 | } |
169 | 169 | ||
170 | m_log.InfoFormat("[AVFACTORY]: complete texture check for {0}", client.AgentId); | 170 | m_log.DebugFormat("[AVFACTORY]: complete texture check for {0}", client.AgentId); |
171 | 171 | ||
172 | // If we only found default textures, then the appearance is not cached | 172 | // If we only found default textures, then the appearance is not cached |
173 | return (defonly ? false : true); | 173 | return (defonly ? false : true); |