Check if value is already In Cache - Android App

Android examples for App:Cache

Description

Check if value is already In Cache

Demo Code


//package com.book2s;
import android.graphics.Bitmap;
import android.util.LruCache;

public class Main {
    private static LruCache<String, Bitmap> mCache;

    public static boolean alreadyInCache(String key) {
        return mCache.get(key) != null;
    }//ww  w  .  j  a va 2 s  .c o m
}

Related Tutorials