Serializer cache

Closes #1624