Skip to content
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

Double-checking caching keys for DiskLru cache #19

Closed
motorro opened this issue Feb 12, 2020 · 1 comment
Closed

Double-checking caching keys for DiskLru cache #19

motorro opened this issue Feb 12, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@motorro
Copy link
Owner

motorro commented Feb 12, 2020

DiskLru cache uses 120-symbol (64 in a released 2.0.2) a-zA-Z0-9-_ cache keys which may not be enough for some scenarios. One may hash original parameters but clashing takes place in that case. Need some double-check of caching parameters when reading to avoid returning wrong data

@motorro motorro added the enhancement New feature or request label Feb 12, 2020
@motorro motorro self-assigned this Feb 12, 2020
@motorro
Copy link
Owner Author

motorro commented Feb 12, 2020

OkHttp with 120 symbol cache:

fun key(url: HttpUrl): String = url.toString().encodeUtf8().md5().hex()

motorro added a commit that referenced this issue Feb 12, 2020
motorro added a commit that referenced this issue Feb 13, 2020
motorro added a commit that referenced this issue Feb 13, 2020
motorro added a commit that referenced this issue Feb 13, 2020
motorro added a commit that referenced this issue Feb 13, 2020
motorro added a commit that referenced this issue Feb 13, 2020
motorro added a commit that referenced this issue Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant