Master Spring Boot Caching: Basics, Internals, and Advanced Annotations Explained

Поделиться
HTML-код
  • Опубликовано: 9 фев 2025

Комментарии • 4

  • @akashphadtare352
    @akashphadtare352 День назад +1

    Awesome video ❤

  • @universal4334
    @universal4334 День назад +1

    Q1) What if we are using cache to cache a lookup table data? How do you set a key when we have a lot of data, because there might be a lot of records/attributes in a lookup table
    Q2) If this cachable is used in memory cache, then everything gets stored in the server's storage, and it gets bloated along with all the objects/variables, etc..

    • @CodeSnippetByChetanGhate
      @CodeSnippetByChetanGhate  День назад

      Thanks for asking these questions
      Q1: If caching a lookup table with many records, you can either cache the entire table under a single key for static data or cache individual records using unique keys (like the primary key). Choose based on your access pattern and data size.
      Q2: Yes, in-memory caches can bloat server memory. To manage this, use eviction policies, set expiration times (TTL), or opt for distributed caches like Redis to offload storage from the application memory.