OpenJPA
  1. OpenJPA
  2. OPENJPA-1006

Disabling QueryCaching at runtime does not work

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1, 2.0.0-M2
    • Fix Version/s: 1.1.1, 2.0.0-M2
    • Component/s: datacache
    • Labels:
      None
    • Environment:
      N/A.
      should be replicable on all environments.
      The one I tried is on windows with oracle 10g as database.

      Description

      An application has a configuration that allows query caching, but is making runtime calls to inform a fetch plan to disable query caching.

      The bug is that this dynamic no-caching request is being ignored by the query cache executor, which then caches the query regardless.

      Tried to disable query cache using
      OpenJPAEntityManager.getFetchPlan().setQueryResultCache(false);

      and also

      query.getFetchPlan().setQueryResultCacheEnabled(false);

      1. TestQueryResultSize.java
        3 kB
        Ravi P Palacherla
      2. openJPATestcase.zip
        8 kB
        Ravi P Palacherla
      3. OPENJPA-1006.patch
        2 kB
        Ravi P Palacherla

        Activity

        Ravi P Palacherla created issue -
        Ravi P Palacherla made changes -
        Field Original Value New Value
        Attachment openJPATestcase.zip [ 12404164 ]
        Ravi P Palacherla made changes -
        Attachment OPENJPA-1006.patch [ 12405179 ]
        Attachment TestQueryResultSize.java [ 12405180 ]
        David Ezzio made changes -
        Assignee David Ezzio [ dezzio ]
        David Ezzio made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 2.0.0 [ 12313483 ]
        Resolution Fixed [ 1 ]
        David Ezzio made changes -
        Fix Version/s 1.1.1 [ 12313177 ]

          People

          • Assignee:
            David Ezzio
            Reporter:
            Ravi P Palacherla
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development