diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs index 14b0280..23c1f03 100644 --- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs | |||
@@ -41,16 +41,16 @@ namespace OpenSim.Region.CoreModules.Asset | |||
41 | /// </summary> | 41 | /// </summary> |
42 | /// <remarks> | 42 | /// <remarks> |
43 | /// <para> | 43 | /// <para> |
44 | /// Cache is enabled by setting "AssetCaching" configuration to value "CenomeMemoryAssetCache". | 44 | /// Cache is enabled by setting "AssetCaching" configuration to value "CenomeMemoryAssetCache". |
45 | /// When cache is successfully enable log should have message | 45 | /// When cache is successfully enable log should have message |
46 | /// "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = XXX bytes, MaxCount = XXX, ExpirationTime = XXX)". | 46 | /// "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = XXX bytes, MaxCount = XXX, ExpirationTime = XXX)". |
47 | /// </para> | 47 | /// </para> |
48 | /// <para> | 48 | /// <para> |
49 | /// Cache's size is limited by two parameters: | 49 | /// Cache's size is limited by two parameters: |
50 | /// maximal allowed size in bytes and maximal allowed asset count. When new asset | 50 | /// maximal allowed size in bytes and maximal allowed asset count. When new asset |
51 | /// is added to cache that have achieved either size or count limitation, cache | 51 | /// is added to cache that have achieved either size or count limitation, cache |
52 | /// will automatically remove less recently used assets from cache. Additionally | 52 | /// will automatically remove less recently used assets from cache. Additionally |
53 | /// asset's lifetime is controlled by expiration time. | 53 | /// asset's lifetime is controlled by expiration time. |
54 | /// </para> | 54 | /// </para> |
55 | /// <para> | 55 | /// <para> |
56 | /// <list type="table"> | 56 | /// <list type="table"> |
@@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
94 | public class CenomeMemoryAssetCache : IAssetCache, ISharedRegionModule | 94 | public class CenomeMemoryAssetCache : IAssetCache, ISharedRegionModule |
95 | { | 95 | { |
96 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 96 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
97 | 97 | ||
98 | /// <summary> | 98 | /// <summary> |
99 | /// Cache's default maximal asset count. | 99 | /// Cache's default maximal asset count. |
100 | /// </summary> | 100 | /// </summary> |
@@ -119,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
119 | /// Asset's default expiration time in the cache. | 119 | /// Asset's default expiration time in the cache. |
120 | /// </summary> | 120 | /// </summary> |
121 | public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); | 121 | public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); |
122 | 122 | ||
123 | /// <summary> | 123 | /// <summary> |
124 | /// Cache object. | 124 | /// Cache object. |
125 | /// </summary> | 125 | /// </summary> |
@@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
213 | if (asset != null) | 213 | if (asset != null) |
214 | { | 214 | { |
215 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID); | 215 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID); |
216 | 216 | ||
217 | long size = asset.Data != null ? asset.Data.Length : 1; | 217 | long size = asset.Data != null ? asset.Data.Length : 1; |
218 | m_cache.Set(asset.ID, asset, size); | 218 | m_cache.Set(asset.ID, asset, size); |
219 | m_cachedCount++; | 219 | m_cachedCount++; |
@@ -246,7 +246,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
246 | } | 246 | } |
247 | 247 | ||
248 | /// <summary> | 248 | /// <summary> |
249 | /// Get asset stored | 249 | /// Get asset stored |
250 | /// </summary> | 250 | /// </summary> |
251 | /// <param name="id"> | 251 | /// <param name="id"> |
252 | /// The asset's id. | 252 | /// The asset's id. |
@@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
283 | 283 | ||
284 | // if (null == assetBase) | 284 | // if (null == assetBase) |
285 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); | 285 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); |
286 | 286 | ||
287 | return assetBase; | 287 | return assetBase; |
288 | } | 288 | } |
289 | 289 | ||
@@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
299 | get { return "CenomeMemoryAssetCache"; } | 299 | get { return "CenomeMemoryAssetCache"; } |
300 | } | 300 | } |
301 | 301 | ||
302 | public Type ReplaceableInterface | 302 | public Type ReplaceableInterface |
303 | { | 303 | { |
304 | get { return null; } | 304 | get { return null; } |
305 | } | 305 | } |
@@ -349,7 +349,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
349 | 349 | ||
350 | if (name != Name) | 350 | if (name != Name) |
351 | return; | 351 | return; |
352 | 352 | ||
353 | long maxSize = DefaultMaxSize; | 353 | long maxSize = DefaultMaxSize; |
354 | int maxCount = DefaultMaxCount; | 354 | int maxCount = DefaultMaxCount; |
355 | TimeSpan expirationTime = DefaultExpirationTime; | 355 | TimeSpan expirationTime = DefaultExpirationTime; |