fix CacheLogic when there are references to EnumEntity<T>