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

DiskLruCache entry?.currentEditor is allways not null for async requests #8352

Closed
KDevvv opened this issue Apr 8, 2024 · 1 comment
Closed
Labels
bug Bug in existing code

Comments

@KDevvv
Copy link

KDevvv commented Apr 8, 2024

I run multiple requests using coroutines and retrofit2 and with proper caching headers in incerteptors and everything works fine except one request that is called multiple times and in result doesn't save to cache.

I debug DiskLruCache class and notice that:

if (entry?.currentEditor != null) { return null // Another edit is in progress. }

is allways not null for this particular endpoint.

@KDevvv KDevvv added the bug Bug in existing code label Apr 8, 2024
@swankjesse
Copy link
Member

Please contribute an executable test case that demonstrates this problem. You should be able to add a test to CacheTest.kt which is where all this stuff goes in OkHttp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug in existing code
Projects
None yet
Development

No branches or pull requests

2 participants