core/src/in/srain/cube/diskcache/CacheEntry.java
public void commit() throws IOException {
        if (!mIsUnderEdit) {
            throw new IOException("CacheEntry has been closed.");
        }
        if (hasErrors) {
            mDiskCache.delete(mKey);
        } else {
            File dirty = getTempFile();
            if (dirty.exists()) {
                File clean = getCacheFile();
                dirty.renameTo(clean);
                mOldSize = mSize;
                mSize = clean.length();
                mDiskCache.commitEdit(this);
            } else {
                abortEdit();
            }
        }
        mIsUnderEdit = false;
    }
public void commit() throws IOException {
        if (!mIsUnderEdit) {
            throw new IOException("CacheEntry has been closed.");
        }
        if (hasErrors) {
            mDiskCache.delete(mKey);
        } else {
            File dirty = getTempFile();
            if (dirty.exists()) {
                File clean = getCacheFile();
                dirty.renameTo(clean);
                mOldSize = mSize;
                mSize = clean.length();
                mDiskCache.commitEdit(this);
            } else {
                abortEdit();
            }
        }
        mIsUnderEdit = false;
    }
Commits this edit so it is visible to readers.  This releases the
edit lock so another edit may be started on the same key.