Analysis updated 2026-07-03
Cache network API responses in an Android app so the same data loads instantly within a configurable time window.
Replace SharedPreferences with ASimpleCache to store richer data types like Bitmaps or JSON arrays.
Set auto-expiring cache entries for user avatar images so they refresh once per day without manual cleanup.
| yangfuhai/asimplecache | google/rejoiner | lisawray/groupie | |
|---|---|---|---|
| Stars | 3,664 | 3,664 | 3,673 |
| Language | Java | Java | Java |
| Setup difficulty | easy | hard | easy |
| Complexity | 2/5 | 4/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
ASimpleCache is a lightweight caching library for Android and Java, written in Chinese by developer yangfuhai. The entire library is contained in a single Java file, making it easy to drop into a project without adding a large dependency. It can store several types of data: plain strings, JSON objects and arrays, images (Bitmap and Drawable), serialized Java objects, and raw byte arrays. Each item stored in the cache can be given an expiration time in seconds or days, once the time is up, the item is automatically deleted and any request for it returns null. The cache is also configurable in terms of where files are stored and how many items or how much total space it is allowed to use. It supports access from multiple processes. The README, written in Chinese, describes a few typical Android use cases: using it in place of SharedPreferences for storing configuration, or caching the results of network requests so that the app does not need to fetch the same data again within a short window. The usage example shows creating a cache instance with ACache.get(this), storing a value with mCache.put("key", "value"), and retrieving it with mCache.getAsString("key"). An optional second argument to put sets the expiration duration.
A single Java file that adds disk caching to Android apps, letting you store strings, JSON, images, and objects with automatic expiration so the app does not refetch the same data repeatedly.
Mainly Java. The stack also includes Java, Android.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.