public AttributeCache(MemoryContext ctx, FastAttrib attrib)
 {
     _ctx             = ctx ?? throw new ArgumentNullException(nameof(ctx));
     _attrib          = attrib ?? throw new ArgumentNullException(nameof(attrib));
     _allocationCache = new AllocationCache <Map <AttributeKey, AttributeValue> .Entry>(attrib.BucketAllocator);
     _groupCache      = new ContainerCache <FastAttribGroup>(attrib.FastAttribGroups);
 }
Esempio n. 2
0
        public static List <T> GetCachedItems <T>(this Container <T> container) where T : MemoryObject
        {
            var cache = new ContainerCache <T>(container);

            cache.Update();
            return(cache.NewItems);
        }