Line history now gets sliced to max 400 items and cached docs are deleted, both on before unload.