Implemented cache for types