square / picasso

A powerful image downloading and caching library for Android
https://square.github.io/picasso/
Apache License 2.0
18.72k stars 3.97k forks source link

about cache #1367

Closed BelongsH closed 6 years ago

BelongsH commented 8 years ago

I have a problem. when picasso load url(have params),memory cache is not working. but in normal url everything is Ok.

.image.png?version=1.1

okhttpClient:

client = new OkHttpClient.Builder()
                            .retryOnConnectionFailure(true)
                            .connectTimeout(15, TimeUnit.SECONDS)
                            .cache(new Cache(new File(Environment.getExternalStorageDirectory().getPath() +"image"), 50))
                            .build();

Application:
 int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 4);
        Picasso picasso = new Picasso.Builder(getApplicationContext())
                .memoryCache(new LruCache(maxMemory))
                .downloader(new OkHttp3Downloader(OkHttpUtils.getClient()))
                .build();
        Picasso.setSingletonInstance(picasso);
JakeWharton commented 6 years ago

I cannot reproduce this with the sample. If you can create a sample that reproduces we can take a look. Closing based on the time it's been since the original issue.