OpenJPA
  1. OpenJPA
  2. OPENJPA-1603

Decouple the QueryCache from the DataCache

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: datacache
    • Labels:
      None

      Description

      In doing some testing I have found that there is a valid use case where one would want to use the query results cache (openjpa.QueryCache), but not the DataCache. I'm using this JIRA to remove the dependency between these two caches.

      The gist of this change is that the QueryCache will now talk with the StoreContext to see if the results of a cached query are contained in the L1 cache OR by any of the DelegatingStoreManager's cache. The default JDBCStoreManager and the XMLStoreManager both do not have any concept of a cache and will always not have any cached results.

        Activity

        Rick Curtis created issue -
        Hide
        Michael Dick added a comment -

        Targeting for 2.0.0.

        Show
        Michael Dick added a comment - Targeting for 2.0.0.
        Michael Dick made changes -
        Field Original Value New Value
        Fix Version/s 2.0.0 [ 12314019 ]
        Hide
        Rick Curtis added a comment -

        Committed rev. 928968 to the 2.0.x branch.

        I had to make a couple last minute changes to the two new Entities that were added with this JIRA to get all of the tests to pass. Mike – if you don't like what I've done, feel free to change/update the Entities properly.

        Another note, currently to get a reference to the QueryCache you need to go through the DataCacheManager. Ideally you wouldn't need to do this, but I'm trying to limit my changes to the bare essentials to limit additional churn.

        Show
        Rick Curtis added a comment - Committed rev. 928968 to the 2.0.x branch. I had to make a couple last minute changes to the two new Entities that were added with this JIRA to get all of the tests to pass. Mike – if you don't like what I've done, feel free to change/update the Entities properly. Another note, currently to get a reference to the QueryCache you need to go through the DataCacheManager. Ideally you wouldn't need to do this, but I'm trying to limit my changes to the bare essentials to limit additional churn.
        Hide
        Michael Dick added a comment -

        I have no problem with the entities Rick.

        Rev 929266 has the changes for trunk.

        Show
        Michael Dick added a comment - I have no problem with the entities Rick. Rev 929266 has the changes for trunk.
        Hide
        Rick Curtis added a comment -

        I didn't notice this before, but it looks like I fat fingered my commit message for the 2.0.x branch. Here is a link to the real commit – http://svn.apache.org/viewcvs?view=rev&rev=928968

        Show
        Rick Curtis added a comment - I didn't notice this before, but it looks like I fat fingered my commit message for the 2.0.x branch. Here is a link to the real commit – http://svn.apache.org/viewcvs?view=rev&rev=928968
        Hide
        Donald Woods added a comment -

        Code checked into 2.0.0, so marking it resolved for the release notes.
        If more work is required, please open a new issue and link it to this one.

        Show
        Donald Woods added a comment - Code checked into 2.0.0, so marking it resolved for the release notes. If more work is required, please open a new issue and link it to this one.
        Donald Woods made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Rick Curtis
            Reporter:
            Rick Curtis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development