Cayenne
  1. Cayenne
  2. CAY-1445

Initialize QueryCache via dependency injection

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1M1
    • Fix Version/s: 3.1M2
    • Component/s: Core Library, Modeler
    • Labels:
      None

      Description

      Currently DataContext/BaseContext are trying to guess their QueryCache from the parent or instantiate the default. We should start using the injection for that. This will result in a pretty serious refactoring namely in QueryCacheFactory interface going away, replaced with a corresponding Provider<QueryCache>.

        Issue Links

        There are no Sub-Tasks for this issue.

          Activity

          Andrus Adamchik created issue -
          Andrus Adamchik made changes -
          Field Original Value New Value
          Link This issue depends on CAY-1446 [ CAY-1446 ]
          Andrus Adamchik made changes -
          Summary Switch QueryCacheFactory to depenency injection Switch QueryCacheFactory to dependency injection
          Andrus Adamchik made changes -
          Link This issue depends on CAY-1447 [ CAY-1447 ]
          Hide
          Andrus Adamchik added a comment -

          when CAY-1447 is implemented, this task can be done uniformly for client and server.

          Show
          Andrus Adamchik added a comment - when CAY-1447 is implemented, this task can be done uniformly for client and server.
          Andrus Adamchik made changes -
          Summary Switch QueryCacheFactory to dependency injection Initialize QueryCache via dependency injection
          Description Currently DataContext/BaseContext are trying to guess their QueryCache from the parent or instantiate the default. We should start using the injection for that. Since injection mechanism is not configured in ROP yet, this implementation will do the following:

          1. Do QueryCache injection at the BaseContext (superclass) level.
          2. Remove custom loading code from DataContext
          3. Move BaseContext custom loading code to CayenneContext
          4. In the factory implementation wrap the underlying cache in NestedQueryCache for ObjectContexts (and for shared cache?) instead of instantiating a new cache for each child context. This would allow centralized cache groups management
          Currently DataContext/BaseContext are trying to guess their QueryCache from the parent or instantiate the default. We should start using the injection for that. This will result in a pretty serious refactoring namely in QueryCacheFactory interface going away, replaced with a corresponding Provider<QueryCache>.
          Component/s Core Library [ 12312714 ]
          Component/s Modeler [ 12312713 ]
          Andrus Adamchik made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 3.1M2 [ 12315560 ]
          Fix Version/s 3.1M1 [ 12314299 ]
          Resolution Fixed [ 1 ]
          Gavin made changes -
          Link This issue depends on CAY-1446 [ CAY-1446 ]
          Gavin made changes -
          Link This issue depends upon CAY-1446 [ CAY-1446 ]
          Gavin made changes -
          Link This issue depends on CAY-1447 [ CAY-1447 ]
          Gavin made changes -
          Link This issue depends upon CAY-1447 [ CAY-1447 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          233d 3h 50m 1 Andrus Adamchik 30/Jan/11 01:48

            People

            • Assignee:
              Andrus Adamchik
              Reporter:
              Andrus Adamchik
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development