Jesse Wilson

Results 300 comments of Jesse Wilson

Which OS and filesystem? I'd like to try to reproduce in the same environment!

In theory the cache should be able to recover from an incomplete journal. ``` @Test public void openWithTruncatedLineDiscardsThatLine() throws Exception { cache.close(); writeFile(getCleanFile("k1", 0), "A"); writeFile(getCleanFile("k1", 1), "B"); Writer writer...

Best advice is to work-around by setting the cache size smaller. From the Javadocs: ``` * This cache limits the number of bytes that it will store on the *...

Yup, it should definitely skip entries being edited.

It's _close_ to what we want. I think it's going to run faster as a single loop that runs until the size is sufficiently small, or there's nothing left to...

And even better, send the pull request against [OkHttp](https://github.com/square/okhttp/pulls)? Its DiskLruCache is developed further than this one. Someday we should just simplify this project into a repackaging of a subset...

If the rename does fail, we're in an awkward place. We can't wait for the previous file to be closed (that could take forever) and we can't delete it either....

This is a policy decision in the API. You can manually call flush() in your own code if you'd like to flush the journal after every write. DiskLruCache doesn't do...

That said, this does need to be documented!