Code example for LruCache

Methods: get, put, remove

0
	public void putFolderBitmap(long key, Bitmap bm) {
		mFolderCache.put(key, bm);
	} 
	 
	public Bitmap getFolderBitmap(long key) {
		return mFolderCache.get(key);
	} 
 
	public void rotateBitmap(int rotation, long key) {
		Bitmap bm = getBitmap(key);
    	if (bm != null) {
    		Bitmap newBitmap = MediaLoader.rotateBitmap(bm, rotation, false);
    		if (mFolderCache.remove(key) != null) {
    			mFolderCache.put(key, newBitmap);
    		} else { 
    			if (mContentCache.remove(key) != null) {
    				mContentCache.put(key, newBitmap);
    			} 
    		} 
    	} 
	}