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

The @Cacheable annotation is part of the Spring Cache abstraction.

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

Contents


More Related Answers

  • What are the different types of caches available in Hibernate?
  • What is caching? Have you used any caching framework with Spring Boot?
  • Service definition with Cacheable Annotation
  • Cache Annotations
  • Implementing Cacheable Services

  • The @Cacheable annotation is part of the Spring Cache abstraction.

    0

    This annotation indicates that the result of a

    method invocation should be cached so that

    subsequent invocations with the same

    arguments can return the result from the

    cache.

    1. Before the method execution, Spring

    generates a cache key based on the

    method arguments and the specified

    cache name.

    2. Spring checks if the cache contains a

    value associated with the generated

    cache key.

    3. If a cached value is found, it is returned

    directly, and the method is not executed.

    4. The method is executed if no cached

    value is found, and the result is stored in

    the cache with the generated key.

    5. The result of the method is returned to the

    caller. 

    Popularity 3/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on May 09 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.