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); }
public static List <T> GetCachedItems <T>(this Container <T> container) where T : MemoryObject { var cache = new ContainerCache <T>(container); cache.Update(); return(cache.NewItems); }