1
0
mirror of https://github.com/accelforce/Yuito synced 2024-12-23 13:58:36 +01:00

increase cache size & dont cache full size media (#710)

This commit is contained in:
Konrad Pozniak 2018-07-14 17:12:57 +02:00 committed by GitHub
parent f50cac4b0c
commit aa5eb9f99a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -209,6 +209,7 @@ public final class ViewMediaFragment extends BaseFragment {
Picasso.with(getContext())
.load(url)
.noPlaceholder()
.networkPolicy(NetworkPolicy.NO_STORE)
.into(photoView, new Callback() {
@Override
public void onSuccess() {

View File

@ -92,7 +92,7 @@ public class OkHttpUtils {
specList.add(fallback);
specList.add(ConnectionSpec.CLEARTEXT);
int cacheSize = 10*1024*1024; // 10 MiB
int cacheSize = 25*1024*1024; // 25 MiB
OkHttpClient.Builder builder = new OkHttpClient.Builder()
.addInterceptor(getUserAgentInterceptor())