Performance optimisation

Don’t save file into cash if it will be great than max cash size