Use `writeInsert` size when caching record insert.

Closes #237.