{"id":15686954,"url":"https://github.com/gabrielbb/android-bitmap-diskcache","last_synced_at":"2025-05-07T18:52:05.235Z","repository":{"id":218249167,"uuid":"161048057","full_name":"GabrielBB/Android-Bitmap-DiskCache","owner":"GabrielBB","description":"Java implementation of a Disk-based LRU cache for Android Bitmaps","archived":false,"fork":false,"pushed_at":"2019-09-13T18:01:52.000Z","size":8,"stargazers_count":9,"open_issues_count":0,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-31T13:03:22.137Z","etag":null,"topics":["android","bitmap","disk-cache","lru-cache"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GabrielBB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-12-09T14:31:36.000Z","updated_at":"2023-10-22T14:47:26.000Z","dependencies_parsed_at":"2024-01-20T19:00:39.515Z","dependency_job_id":null,"html_url":"https://github.com/GabrielBB/Android-Bitmap-DiskCache","commit_stats":null,"previous_names":["gabrielbb/android-bitmap-diskcache"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielBB%2FAndroid-Bitmap-DiskCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielBB%2FAndroid-Bitmap-DiskCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielBB%2FAndroid-Bitmap-DiskCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielBB%2FAndroid-Bitmap-DiskCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabrielBB","download_url":"https://codeload.github.com/GabrielBB/Android-Bitmap-DiskCache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252939350,"owners_count":21828749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","bitmap","disk-cache","lru-cache"],"created_at":"2024-10-03T17:42:04.836Z","updated_at":"2025-05-07T18:52:05.172Z","avatar_url":"https://github.com/GabrielBB.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android-Bitmap-DiskCache\n\nJava implementation of a Disk-based LRU cache for Android Bitmaps. This is an asynchronous implementation of [JakeWharton's DiskLruCache](https://github.com/JakeWharton/DiskLruCache) targeted for bitmaps and easier to use\n\n### Requirements\n\n1 - Add the following library to your `build.gradle`:\n\n```groovy\nimplementation 'com.jakewharton:disklrucache:2.0.2'\n```\n\n2 - Copy the BitmapDiskCache class that you can find in this repo to your project\n\n### Usage\n\nYou can instantiate the BitmapDiskCache in your activity like this:\n\n```java\nfinal BitmapDiskCache cache = new BitmapDiskCache(getApplicationContext());\n```\n\nYou can add bitmaps to the cache and get the assigned key like this:\n\n```java\ncache.add(someBitmap, key -\u003e {\n  // Store the key\n });\n```\n\nYou can retrieve a bitmap by its key like this:\n\n```java\ncache.get(key, bitmap -\u003e {\n  // Use bitmap\n });\n```\n\nWhen you finish using the cache or when your activity finishes you need to close the cache reference:\n\n```java\ncache.close();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielbb%2Fandroid-bitmap-diskcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielbb%2Fandroid-bitmap-diskcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielbb%2Fandroid-bitmap-diskcache/lists"}