JakeWharton/DiskLruCache — pull request #62 by marcplouhinec (2014-05-25 17:24:05+00:00)
Title: Key limitations removal

Hello,

I modified DiskLruCache to be able to use keys with less limitations. The key can now contain:
* Any number of characters as long as it is not empty.
* Any type of characters (not limited to [a-z0-9_-]).

My original goal is to be able to cache images by using their URLs as keys.

The main changes I made to the code was to introduce the concept of an "ID". Since the keys can contain any type of characters, I cannot use them directly in the filenames. Instead, I generate IDs that respect the [a-z0-9_-]{1,64} rule by using an UUID and concatenating it with a subset of the key.

I hope you will like my modifications. Don't hesitate to contact me if anything is unclear or need to be fixed.

See you!

Marc Plouhinec