Letting the Flotsam cache be enabled even when [AssetCache] section is missing. Thank you mcortez!
parent
a7fcacf8f3
commit
ca52c3ef26
OpenSim/Region/CoreModules/Asset
|
@ -161,17 +161,17 @@ namespace Flotsam.RegionModules.AssetCache
|
||||||
|
|
||||||
if (name == Name)
|
if (name == Name)
|
||||||
{
|
{
|
||||||
|
m_Enabled = true;
|
||||||
|
m_log.InfoFormat("[ASSET CACHE]: {0} enabled", this.Name);
|
||||||
|
|
||||||
IConfig assetConfig = source.Configs["AssetCache"];
|
IConfig assetConfig = source.Configs["AssetCache"];
|
||||||
if (assetConfig == null)
|
if (assetConfig == null)
|
||||||
{
|
{
|
||||||
m_log.Error("[ASSET CACHE]: AssetCache missing from OpenSim.ini");
|
m_log.Warn("[ASSET CACHE]: AssetCache missing from OpenSim.ini, using defaults.");
|
||||||
|
m_log.InfoFormat("[ASSET CACHE]: Cache Directory", m_DefaultCacheDirectory);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Enabled = true;
|
|
||||||
|
|
||||||
m_log.InfoFormat("[ASSET CACHE]: {0} enabled", this.Name);
|
|
||||||
|
|
||||||
m_CacheDirectory = assetConfig.GetString("CacheDirectory", m_DefaultCacheDirectory);
|
m_CacheDirectory = assetConfig.GetString("CacheDirectory", m_DefaultCacheDirectory);
|
||||||
m_log.InfoFormat("[ASSET CACHE]: Cache Directory", m_DefaultCacheDirectory);
|
m_log.InfoFormat("[ASSET CACHE]: Cache Directory", m_DefaultCacheDirectory);
|
||||||
|
|
||||||
|
@ -182,6 +182,7 @@ namespace Flotsam.RegionModules.AssetCache
|
||||||
m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000);
|
m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
m_LogLevel = assetConfig.GetInt("LogLevel", 1);
|
||||||
m_HitRateDisplay = (ulong)assetConfig.GetInt("HitRateDisplay", 1);
|
m_HitRateDisplay = (ulong)assetConfig.GetInt("HitRateDisplay", 1);
|
||||||
|
|
||||||
m_FileExpiration = TimeSpan.FromHours(assetConfig.GetDouble("FileCacheTimeout", m_DefaultFileExpiration));
|
m_FileExpiration = TimeSpan.FromHours(assetConfig.GetDouble("FileCacheTimeout", m_DefaultFileExpiration));
|
||||||
|
|
Loading…
Reference in New Issue