mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
* A saved archive now immediately expires the data in the asset cache that it used, rather than retaining all the assets (esp textures) in the cache. * This is an imperfect solution. Ideally we would only expire the assets newly requested for the archive (not existing ones). But doing that would require a lot more restructuring. * I don't believe there are any locking issues due to the locking performed by the underlying memory cache, but please report any issues.
This commit is contained in:
@@ -72,7 +72,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
/// </summary>
|
||||
protected IAssetCache m_assetCache;
|
||||
|
||||
protected internal AssetsRequest(ICollection<UUID> uuids, IAssetCache assetCache, AssetsRequestCallback assetsRequestCallback)
|
||||
protected internal AssetsRequest(
|
||||
ICollection<UUID> uuids, IAssetCache assetCache, AssetsRequestCallback assetsRequestCallback)
|
||||
{
|
||||
m_uuids = uuids;
|
||||
m_assetsRequestCallback = assetsRequestCallback;
|
||||
@@ -100,9 +101,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
public void AssetRequestCallback(UUID assetID, AssetBase asset)
|
||||
{
|
||||
if (asset != null)
|
||||
m_assets[assetID] = asset;
|
||||
{
|
||||
m_assetCache.ExpireAsset(assetID);
|
||||
m_assets[assetID] = asset;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_notFoundAssetUuids.Add(assetID);
|
||||
}
|
||||
|
||||
//m_log.DebugFormat(
|
||||
// "[ARCHIVER]: Received {0} assets and notification of {1} missing assets", m_assets.Count, m_notFoundAssetUuids.Count);
|
||||
|
||||
Reference in New Issue
Block a user