nl_tokens: customize cache
pl_tokens: public static void customizeCache ( Context context , int memoryCacheSizeInKB , String defaultDiskCachePath , int defaultDiskCacheSizeInKB , String stableDiskCachePath , int stableDiskCacheSizeInKB ) { // init memory cache first if ( memoryCacheSizeInKB > 0 ) { int maxCacheSizeInKB = Math . round ( 0.5f * Runtime . getRuntime ( ) . maxMemory ( ) / 1024 ) ; memoryCacheSizeInKB = Math . <mask> ( memoryCacheSizeInKB , maxCacheSizeInKB ) ; sDefaultImageMemoryCache = new DefaultMemoryCache ( memoryCacheSizeInKB ) ; } if ( defaultDiskCacheSizeInKB > 0 && ! TextUtils . isEmpty ( defaultDiskCachePath ) ) { ImageDiskCacheProvider imageFileProvider = getImageFileProvider ( context , defaultDiskCachePath , defaultDiskCacheSizeInKB , DEFAULT_FILE_CACHE_DIR ) ; if ( imageFileProvider != null ) { sDefaultImageProvider = new ImageProvider ( context , getDefaultImageMemoryCache ( ) , imageFileProvider ) ; } } if ( stableDiskCacheSizeInKB > 0 && ! TextUtils . isEmpty ( stableDiskCachePath ) ) { ImageDiskCacheProvider imageFileProvider = getImageFileProvider ( context , stableDiskCachePath , stableDiskCacheSizeInKB , STABLE_FILE_CACHE_DIR ) ; if ( imageFileProvider != null ) { sStableImageProvider = new ImageProvider ( context , getDefaultImageMemoryCache ( ) , imageFileProvider ) ; } } }