Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17024

Evaluate @Cacheable(condition) once per method invocation only

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 5.0.7
    • Fix Version/s: 5.1 RC1
    • Component/s: Caching
    • Labels:
      None

      Description

      Cacheable(condition) is evaluated twice for every invocation on the proxied object. For a failing test see https://github.com/ggeorgovassilis/spring-cache-double-condition-evaluation/tree/master

      This is a potential performance bottleneck as conditions may delegate to objects which query a database or perform costly cryptographic operations.

        Attachments

          Activity

            People

            Assignee:
            juergen.hoeller Juergen Hoeller
            Reporter:
            g.georgovassilis George Georgovassilis
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 29 weeks, 6 days ago