示例#1
0
        static protected void StoreDataInCacheWithGUID(BuildCache cache, GUID guid, object data, GUID depGUID = new GUID())
        {
            List <CacheEntry> deps = new List <CacheEntry>();

            if (!depGUID.Empty())
            {
                deps.Add(cache.GetCacheEntry(depGUID));
            }

            CacheEntry entry1 = cache.GetCacheEntry(guid);
            CachedInfo info   = new CachedInfo();

            info.Asset        = entry1;
            info.Dependencies = deps.ToArray();
            info.Data         = new object[] { data };
            cache.SaveCachedData(new List <CachedInfo>()
            {
                info
            });
            cache.SyncPendingSaves();
        }