Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Challenges of Caching

Sumit Rawal answered on May 14, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • What is the caching mechanism?
  • Web Caching
  • Why should we use caching
  • Types of Caching
  • Caching strategies
  • What is caching?
  • caching
  • chear cache shortcut
  • What is the caching mechanism?
  • Caching Strategies in Distributed Caching
  • Base caching
  • Full Caching
  • Custom Caching

  • Challenges of Caching

    0

    Caching is a complex practice, and there are inevitables cons of using it. Let’s see the most vicious ones.

    Coherence Problem — Since whenever data is cached, a copy is created, there are now two copies of the same data. This means that they can diverge over time. Identifying the best cache update or invalidation mechanism is one of the biggest challenges related to caching and perhaps one of the hardest challenges in computer science.

    Choosing which Data to be Cached — Virtually any kind of data can be cached. This means that choosing what should reside in our cache and what to exclude is open to endless possibilities. Thus, it may become a very complex decision. As tackling this problem, there are some aspects to take into account, here are the 3 most recurrent ones:

    If we expect data to change often, we should not want to cache it for too long. Otherwise, we may offer users inaccurate data. On the other hand, this also depends on how much time we can tolerate stale data.

    Our cache should always be ready to store frequently required data taking a large amount of time to be generated or retrieved. Identifying this data is not an easy task, and you might risk filling our cache with useless data.

    By caching large data, you may fill your cache very rapidly, or worse, using all available memory. If your RAM is shared between your application and your caching system, this can easily become a problem, which is why you should limit the amount of your RAM reserved for caching.

    Dealing with Cache-misses — Cache misses represent the time-based cost of having a cache. In fact, cache misses introducing latencies that would not have been incurred in a system not using caching. So, to benefit from the speed boost deriving from having a cache, cache misses must be kept relatively lows. In particular, they should be low compared to cache hits. Reaching this result is not easy, and if not achieved, our caching system can turn into nothing more than overhead.  

    Popularity 1/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on May 14 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.