Details
-
Bug
-
Resolution: Fixed
-
High
-
3.3.3, 2.5.20, 3.3.4
-
None
-
None
Description
Some methods in LocationHandler are missing InMemory cache implementation which results in multiple calls to SPI cache, deserialization, etc.
Steps to reproduce
1. Clean installation of eZ Platform 2.5/Ibexa DXP v3.2/v3.3
2. Create a new TestController
AppBundle\Controller\TestController
<?php namespace AppBundle\Controller; use eZ\Publish\Core\Persistence\Cache\LocationHandler; use Symfony\Component\HttpFoundation\Response; class TestController { private $locationHandler; public function __construct(LocationHandler $locationHandler) { $this->locationHandler = $locationHandler; } public function testAction() { $this->locationHandler->loadLocationsByContent(52); $this->locationHandler->loadLocationsByContent(52); $this->locationHandler->loadLocationsByContent(52); $this->locationHandler->loadSubtreeIds(2); $this->locationHandler->loadSubtreeIds(2); $this->locationHandler->loadSubtreeIds(2); return new Response( '<html><body>Test Controller</body></html>' ); } }
routing.yml
test: path: /test defaults: { _controller: AppBundle\Controller\TestController::testAction }
services.yml
AppBundle\Controller\TestController: public: true arguments: - "@ezpublish.spi.persistence.cache.locationHandler"
3. Using the dev environment access http://yourproject/test
4. Click on web profiler toolbar cache information.
Result
Web profiler shows multiple calls for ez-content-locations-52 and ez-location-subtree-2 keys.
Expected result
Keys ez-content-locations-52 and ez-location-subtree-2 are retrieved only once.