[encryption] update file cache after the file was written

only update file cache with the unencrypted size after the file was written. This way we make sure that pre hooks still get the "old" size which is the expected behaviour e.g. in the versioning app to check if it's an empty file or not.

cc @PVince81 we already talked about it, maybe you remember...