Caching Technologies

Caching is predominantly important for mobile app, that is used to reduce network calls, and elevate user experiences.

Types of Caching:

  1. In-Memory Caching

  2. Local Storage Caching

  3. Network Response Caching

  4. Image Caching

  5. File Caching

The Below Caching Techniques Are Used in Our App:

In Memory Caching:

  • Used for short-lived data during app runtime.

  • Pacakges / Riverpod: Manage and cache state in memory or else use our own variables to store it.

  • Use Case: API responses, user preferences, temporary data.

  • Used in Paginated List View ( Widget ) in ESS App.

Local Storage Caching ( Persistent Cache )

  • Stores data on the device even after the app is closed.

    • a. SharedPreferences

      • shared_preferences

      • Key-value pairs (Strings, ints, bools )

    • b. Flutter Cache Manager

      • Third Party Package for handling the file level caching.

      • This was used in our ESS salary slip fetching API.

      • The workable version of flutter cache manager, which we used in our ESS App

        flutter_cache_manager:
          git:
            url: https://github.com/Baseflow/flutter_cache_manager.git
            path: flutter_cache_manager
            ref: "54904e499a06d0364a2b3f4ca9789e5f829f1879"


      • Other than this version, there is an issue on deleting files while checking the stale object time and max objects.

    Architecture:flutter_cache_manager (1)

On this page