-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use disk:getCacheKey()must match regex [a-z0-9_-]{1,64}: #3
Comments
Getting same issue, anybody got the DiskCaching working?? |
I wrote this when Volley was first announced (before there was a lot of documentation available). The approach using the disk cache really isn't recommended as Volley is in fact disk caching images for you. I have some misgivings about the Volley documentation and its configurability but it should suit in most cases. I wrote a blog detailing the new findings some time ago: http://www.thekeyconsultant.com/2013/06/update-volley-image-cache.html . I apologize for the confusion here. Also, I am working on a fix for the broken key generation. Essentially you just need to generate a key value that fits the criteria listed in the log. Check out the createKey function in the ImageCacheManager. |
The createKey function in the ImageCacheManager doesn‘t used! |
@AZ-xml two things:
|
I have created a disk cache based on DiskLruCache and it works. It also solves the performance as its L2 cache and not L1 cache. You are welcome to try it out. Hope it helps. |
Working perfectly thx, Only thing is to change on line 106 of DiskLruImageCache to Issue is happening because the key coming from volley library is basically string containing # and uppercase. |
07-17 21:36:36.430 11625-11625/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.IllegalArgumentException: keys must match regex [a-z0-9_-]{1,64}: "#W0#H0http://img.nian.so/dream/3_1364733573.jpg!dream"
at com.jakewharton.disklrucache.DiskLruCache.validateKey(DiskLruCache.java:660)
at com.jakewharton.disklrucache.DiskLruCache.get(DiskLruCache.java:406)
at com.dahuo.nian.net.images.DiskLruImageCache.getBitmap(DiskLruImageCache.java:108)
The text was updated successfully, but these errors were encountered: