Image

image

if

image

byteSize

_cache

maxByteSize

_cache

maxByteSize

image

byteSize

1000

_cache

add

image

);

while

_cache

count

_cache

maxCount

||

_cache

byteSize

_cache

maxByteSize

_cache

discardOldestImage

();

// New logic pseudocode

void

onLoadImage

Image

image

if

image