public static void Set <T>(Options opts, int rawEstimate) { var finalEstimate = CalculateFinalEstimate(rawEstimate); var key = CapacityKey.For(typeof(T), opts); Cache[key] = finalEstimate; }
public static int Get(Type type, Options opts) { var key = CapacityKey.For(type, opts); var ret = Cache[key] ?? DefaultCapacity; return((int)ret); }