Code example for LruCache

Methods: evictAll

0
                photoToLoad.imageView.setImageResource(photoToLoad.fail);
        } 
    } 
 
    public void clearCache() { 
        memoryCache.evictAll();
    } 
     
    private String url2Key(String url){
		String hash = "";
	    try 
	    { 
	        MessageDigest digest = MessageDigest.getInstance( "SHA-1" );
	        byte[] bytes = url.getBytes("UTF-8");
	        digest.update(bytes, 0, bytes.length);
	        bytes = digest.digest();
	        StringBuilder sb = new StringBuilder();
	        for( byte b : bytes )
	        { 
	            sb.append( String.format("%02x", b) );
	        }