teejoe
teejoe

Reputation: 703

Can Universal Image Loader use different DiskCache for images?

I'm using Universal Image Loader for image loading, In the document I can't find a way to set different DiskCache for image display, the DiskCache directory is set by ImageLoader.getInstance().init(), which is global.

But I want to store some images in a separate DiskCache because I don't want it to be removed when LruDiskCache is full or cleared manually, I there anyway to do this?

Upvotes: 0

Views: 91

Answers (1)

SilentKnight
SilentKnight

Reputation: 14021

I am afraid UIL can't store specific image files intently. If I guess right, these images that you want to store in separate directory are used frequently. But, maybe you don't understand the mechanism of LruDiskCache which means "least recently used disk cache". Which means files used frequently would at the header of the queue all the time. So, if you use LruDiskCache, these images used frequently will be always stored in the disk and not be deleted or cleared. So, your requirement has been fulfilled when you use LruDiskCache.

Upvotes: 0

Related Questions