LruCache

suggest change

Versions

[{“Name”:“3.1.x”,“GroupName”:null},{“Name”:“3.2.x”,“GroupName”:null},{“Name”:“4.0”,“GroupName”:null},{“Name”:“4.0.3”,“GroupName”:null},{“Name”:“4.1”,“GroupName”:null},{“Name”:“4.2”,“GroupName”:null},{“Name”:“4.3”,“GroupName”:null},{“Name”:“4.4”,“GroupName”:null},{“Name”:“4.4W”,“GroupName”:null},{“Name”:“5.0”,“GroupName”:null},{“Name”:“5.1”,“GroupName”:null},{“Name”:“6.0”,“GroupName”:null},{“Name”:“7.0”,“GroupName”:null},{“Name”:“7.1”,“GroupName”:null}]

Remarks

You should use Lru Cache in applications where repetitive resource loads would affect a smooth app behaviour. For example a photo gallery with big thumbnails (128x128).

Always be careful with the size of the Lru cache since setting it too high might affect the app.

After the Lru Cache is no longer useful avoid holding any references to it to allow the Garbage Collector to clean it up from memory.

For the best performance remember to load resources like bitmaps using the best practices like selecting a proper inSampleSize before adding it to the Lru cache.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents