@Override
    public long clean(long bytesToClean) {
        if (isEmptyStorage()) return 0;

        long cleanedBytes = 0;
        for (Map.Entry<FileTime, File> fileEntry : cachedFiles.entrySet()) {
            try {
                final File oldFile = fileEntry.getValue();
                final long fileSize = oldFile.length();
                if(deleteFile(oldFile)){
                    cachedFiles.remove(fileEntry.getKey());
                    cleanedBytes += fileSize;
                }
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
            if ((cleanedBytes > bytesToClean) ||  isEmptyStorage()) break;
        }
        return cleanedBytes;
    }