<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/android-bitmap-caching-revisited-nzlht3swo" -->

---
title: Android Bitmap Caching… revisited | daily.dev
description: A revisit of Android bitmap caching techniques, moving away from SoftReferences toward LruCache with a reference-tracking wrapper. The approach wraps Bitmap...
canonical: https://daily.dev/posts/android-bitmap-caching-revisited-nzlht3swo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Android Bitmap Caching… revisited | daily.dev
og:description: A revisit of Android bitmap caching techniques, moving away from SoftReferences toward LruCache with a reference-tracking wrapper. The approach wraps Bitmap...
og:url: https://daily.dev/posts/android-bitmap-caching-revisited-nzlht3swo
og:image: https://api.daily.dev/og/posts/NZlHt3sWo.png
og:image:alt: Android Bitmap Caching… revisited
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Android Bitmap Caching… revisited

**[Chris Banes](https://daily.dev/sources/chrisbanes)** · 2 min read · 0 upvotes · 0 comments

## Summary

A revisit of Android bitmap caching techniques, moving away from SoftReferences toward LruCache with a reference-tracking wrapper. The approach wraps Bitmap objects to track whether they are currently displayed or cached, calling Bitmap.recycle() only when neither condition is true. A custom ImageView sets the 'being displayed' flag, while an extended BitmapLruCache manages the 'being cached' flag in put() and entryRemoved(). A known edge case where a bitmap evicted from cache while still displayed cannot be explicitly recycled is noted as resolved.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://chrisbanes.me/posts/android-bitmap-caching-8230-revisited>

## Similar posts on daily.dev

- [Reclaiming Terabytes: Optimizing Android image caching with TLRU](https://daily.dev/posts/reclaiming-terabytes-optimizing-android-image-caching-with-tlru-ghvtrylyl) · Grab Tech Blog · 0 upvotes · 0 comments
- [How Grab Optimizes Image Caching on Android with Time-Aware LRU](https://daily.dev/posts/how-grab-optimizes-image-caching-on-android-with-time-aware-lru-synvwlc48) · InfoQ · 0 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android)

[View this post on daily.dev](https://daily.dev/posts/android-bitmap-caching-revisited-nzlht3swo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Android Bitmap Caching… revisited","url":"https://daily.dev/posts/android-bitmap-caching-revisited-nzlht3swo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/android-bitmap-caching-revisited-nzlht3swo"},"datePublished":"2026-07-05T07:13:51.991Z","dateModified":"2026-07-05T07:17:54.822Z","description":"A revisit of Android bitmap caching techniques, moving away from SoftReferences toward LruCache with a reference-tracking wrapper. The approach wraps Bitmap...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"Chris Banes","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Chris Banes","logo":"https://media.daily.dev/image/upload/s--TEzRqSgz--/f_auto,q_auto/v1783235595/logos/chrisbanes?_a=BAMAMicg0","url":"https://daily.dev/sources/chrisbanes"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/android-bitmap-caching-revisited-nzlht3swo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"android","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Chris Banes","item":"https://daily.dev/sources/chrisbanes"},{"@type":"ListItem","position":3,"name":"Android Bitmap Caching… revisited"}]}
```

