public void AddAsset(AssetBase asset, AssetRequestInfo requestInfo) { requestInfo.AssetId = asset.FullID; if (this.IsAssetStorageAllowed(asset, requestInfo)) { ulong startTime = Util.GetLongTickCount(); try { RemoveFromNegativeCache(asset.FullID); m_assetServer.StoreAsset(asset); } catch (AssetAlreadyExistsException e) { //Don't rethrow this exception. AssetServerExceptions thrown from here // Let's not report this as a warning since this isn't a problem. // m_log.WarnFormat("[ASSET CACHE] Not storing asset that already exists: {0}", e.Message); } StatsManager.SimExtraStats.AddAssetWriteTime((long)(Util.GetLongTickCount() - startTime)); } else { throw new NotSupportedException(String.Format("Not allowing asset storage ID:{0} Type:{1} Source:{2}", asset.ID, asset.Type, requestInfo.Origin)); } //we will save the local asset issue for later as its confusing as hell and even LL isnt //very clear on it. It looks like baked textures, possibly body parts, etc are all //marked as local. from what I can gather this means that the asset is stored locally //on this server, but, and this makes no sense, can be requested by other servers. //on this case why not put it on the asset cluster since it's central anyways? //i could see bakes getting stored locally and regenerated for every sim corssing (i guess) //but this isnt even the case. so im leaving this for now and everything is going to //the asset server }
public void StoreAsset(AssetBase asset) { _writeServer.StoreAsset(asset); }