Use cache entry size in `checkJSONSize`.

See #233.