diff --git a/VERSIONS_WIP/182440 b/VERSIONS_WIP/182440 new file mode 100644 index 0000000000000000000000000000000000000000..84538b55f3b5decda760ed19d76cf5e9bca98871 --- /dev/null +++ b/VERSIONS_WIP/182440 @@ -0,0 +1 @@ + - fonctionnalité #182440 : Export OAI : Correction de la génération du flux OAI ListRecord. Le cache est désactivé pour la récupération des notices. \ No newline at end of file diff --git a/application/modules/opac/controllers/OaiController.php b/application/modules/opac/controllers/OaiController.php index d6ee8f73d28ef23013eee5c0213d85ef14d3cfc7..7b0fd7ce434708a93f60b49503dac4717a875d88 100644 --- a/application/modules/opac/controllers/OaiController.php +++ b/application/modules/opac/controllers/OaiController.php @@ -80,6 +80,7 @@ class OaiController extends ZendAfi_Controller_Action { public function listRecordsAction() { + Storm_Cache::setDefaultZendCache(null); $request = new Class_WebService_OAI_Request_ListRecords($this->_request->getParams(), $this->buildBaseUrl()); $item_builder = new Class_WebService_OAI_Response_RecordBuilder(); diff --git a/tests/application/modules/opac/controllers/OAIControllerListRecordsTest.php b/tests/application/modules/opac/controllers/OAIControllerListRecordsTest.php index 41bff3d761b76a7816460d002668533798157ee3..a4284fcc1a0458c4a8e0e7e2a9f9d50e73a7b7de 100644 --- a/tests/application/modules/opac/controllers/OAIControllerListRecordsTest.php +++ b/tests/application/modules/opac/controllers/OAIControllerListRecordsTest.php @@ -80,10 +80,15 @@ abstract class OAIControllerListRecordsInZorkSetTestCase class OAIControllerListRecordsInZorkSetTest extends OAIControllerListRecordsInZorkSetTestCase { + protected $_cache; + public function setUp() { parent::setUp(); + $this->_cache = $this->mock(); + Storm_Cache::setDefaultZendCache($this->_cache); + $this->dispatch('/opac/oai/request?verb=ListRecords&metadataPrefix=oai_dc&set=zork'); $this->_body = $this->_response->getBody(); } @@ -144,6 +149,12 @@ class OAIControllerListRecordsInZorkSetTest } + /** @test */ + public function cacheShouldNotBeUsed() { + $this->assertFalse($this->_cache->methodHasBeenCalled('load')); + } + + protected function _assertHeaderContentAt($header, $content, $position) { $path = sprintf('//oai:ListRecords/oai:record[%s]/oai:header/oai:%s', $position, $header);