@@ -0,0 +1,1281 @@
+package dpl.bobsun.dummypicloader.cache;%0A%0Aimport android.content.Context;%0Aimport android.graphics.Bitmap;%0Aimport android.graphics.BitmapFactory;%0A%0Aimport java.lang.ref.WeakReference;%0Aimport java.util.HashMap;%0A%0A/**%0A * Created by bobsun on 15-6-9.%0A */%0Apublic class DPLDefaultImageCache %7B%0A    private static DPLDefaultImageCache staticInstance;%0A    private HashMap%3CInteger,WeakReference%3CBitmap%3E%3E cache;%0A    private Context appContext;%0A    private DPLDefaultImageCache(Context context)%7B%0A        appContext = context;%0A        cache = new HashMap%3C%3E();%0A    %7D%0A%0A    public static DPLDefaultImageCache getStaticInstance(Context context)%7B%0A        if (staticInstance == null)%7B%0A            staticInstance = new DPLDefaultImageCache(context);%0A        %7D%0A        return staticInstance;%0A    %7D%0A%0A    public void add(int id)%7B%0A        if (exists(id))%0A            return;%0A        cache.put(id,new WeakReference%3CBitmap%3E(BitmapFactory.decodeResource(appContext.getResources(),id)));%0A    %7D%0A%0A    public boolean exists(int id)%7B%0A        return cache.containsKey(id);%0A    %7D%0A%0A    public Bitmap get(int id)%7B%0A        WeakReference%3CBitmap%3E ret = cache.get(id);%0A        if(ret.get() == null)%7B%0A            return BitmapFactory.decodeResource(appContext.getResources(),id);%0A        %7D%0A        return ret.get();%0A    %7D%0A%7D%0A

Update DPL.