Member-only story

Build Your own Cache Manger

How to build a cache manager like Glide

Satya Pavan Kantamani
10 min readDec 15, 2019

In this article, we’re going to know what is Cache, understand how Glide’s Cache System and how to implement our own CacheManager using LRU strategy.

  1. What is Cache?
  2. How do we cache data?
  3. Cache Strategies.
  4. LRU Cache
  5. Understanding Glide

What is Cache?

Cache which is pronounced as CASH is a hardware or software that is used to store something, usually data, temporarily in a computing environment. The reasons for caching data is fast retrieval and lowering network cost. Fast retrieval of data will help to increase app responsiveness so that users get engaged better. In simple terms, we can say cache is a temporary storage of data.

How do we cache data?

Initially, we fetch data from any external source say network which may take a little bit of time after data is retrieved from the network, then the data is stored or cached locally for future retrieval. There are two main strategies listed below for implementing the cache system in Android.

Caching Strategies:

  • Memory Cache: We store the data retrieved inside the memory of…

--

--

Satya Pavan Kantamani
Satya Pavan Kantamani

Written by Satya Pavan Kantamani

Android Dev, Interested in Traveling, App development. Based in Hyderabad, India. Catch me at https://about.me/satyapavankumar

No responses yet