Issue #2945987 by alphawebgroup: entity_generic_types and entity_generic_hooks should use static cache