DRY serializer TypeCaches as in #78