Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-217

Result cache should cache the SQL result and not the final objects

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA3
    • Fix Version/s: 2.2
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      When fetching objects and using a result cache, it would probably be better to cache the SQL result array instead of the hydrated objects. That way, when grabbing from the cache managed entities can be returned. Also, caching is more efficient since an SQL result array does not need to be serialized/unserialized when storing in apc or memcached.

        Issue Links

          Activity

          Hide
          Benjamin Eberlei added a comment -

          Workaround for this issue: https://gist.github.com/57e6b4deea566baac053

          Also: This will be fixed in 2.2.

          Show
          Benjamin Eberlei added a comment - Workaround for this issue: https://gist.github.com/57e6b4deea566baac053 Also: This will be fixed in 2.2.
          Hide
          Benjamin Eberlei added a comment -

          First step of this hit DBAL today https://github.com/doctrine/dbal/pull/69

          Show
          Benjamin Eberlei added a comment - First step of this hit DBAL today https://github.com/doctrine/dbal/pull/69
          Hide
          Benjamin Eberlei added a comment -

          DBAL code was heavily refactored and merged, the ORM PR is now open for discussion:

          https://github.com/doctrine/doctrine2/pull/172

          Show
          Benjamin Eberlei added a comment - DBAL code was heavily refactored and merged, the ORM PR is now open for discussion: https://github.com/doctrine/doctrine2/pull/172
          Hide
          Benjamin Eberlei added a comment -

          Merged into master

          Show
          Benjamin Eberlei added a comment - Merged into master
          Hide
          Benjamin Eberlei added a comment -

          Related Pull Request was closed: https://github.com/doctrine/doctrine2/pull/87

          Show
          Benjamin Eberlei added a comment - Related Pull Request was closed: https://github.com/doctrine/doctrine2/pull/87

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Roman S. Borschel
            • Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: