[BUGFIX] 1st level cache for ``QueryResult::count()`` 78/40778/2
authorMathias Brodala <mbrodala@pagemachine.de>
Tue, 30 Jun 2015 08:17:23 +0000 (10:17 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 30 Jun 2015 23:00:28 +0000 (01:00 +0200)
commit603edc3f3316ba8dc87a96b6d8f23f0b039b4564
treedea613568f86154f39c814d45980498472010de7
parenta5bec24566f6aaf99559f145d46b6179094b97ce
[BUGFIX] 1st level cache for ``QueryResult::count()``

Counting the results of the ``QueryResultInterface`` proxy returned by
Repository finder methods always executed a ``COUNT query`` even if
the results had been fetched or counted already.

With this patch the number of results is cached as soon as the result
is initialized and/or counted once.

Resolves: #67837
Releases: master, 6.2
Change-Id: I98f680372b845f992ad3d436647b0cf5e460b606
Reviewed-on: http://review.typo3.org/40778
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/extbase/Classes/Persistence/Generic/QueryResult.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryResultTest.php