Bug #38172

Routing cache only works for one request

Added by Bastian Waidelich about 3 years ago. Updated about 3 years ago.

Status:Resolved Start date:2012-06-19
Priority:Should have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:MVC - Routing
Target version:TYPO3 Flow Base Distribution - 1.1 beta 3
PHP Version: Complexity:
Has patch:No Affected Flow version:Git 1.1

Description

Currently the routing uses a TransientMemory Cache Backend by default. Besides, objects in the routing values are converted to hashes using spl_object_has() - which generates a new hash every request.

Instead a more persistent cache backend should be used and objects should be converted to their identifiers using the PersistenceManager.
Note: The cache needs to be flushed when ever a Routes.yaml file has been changed an for functional tests

Associated revisions

Revision c7386f4a
Added by Bastian Waidelich about 3 years ago

[BUGFIX] Routing cache only works for one request

Currently the routing uses a TransientMemory cache backend by
default. Besides, objects in the routing values are converted
to hashes using spl_object_hash() - which generates a new hash
for every request.

This change configures the RouterCachingAspect to use a
SimpleFile cache backend and adjusts the aspect to use the
persistence manager in order to convert objects to their
identifiers before creating cache entries.

This also adds a signal to the FunctionalTestCase base
class that flushes the routing caches on teardown.

Furthermore this adds two convenience methods
getLastMatchedRoute() and getLastResolvedRoute() to the router
which should make debugging and testing easier.

Change-Id: I9605731f78cb1be9b0fb5c439d7149a676b6ccb7
Fixes: #38172
Releases: 1.1, 1.2

Revision de4ea73d
Added by Bastian Waidelich about 3 years ago

[BUGFIX] Routing cache only works for one request

Currently the routing uses a TransientMemory cache backend by
default. Besides, objects in the routing values are converted
to hashes using spl_object_hash() - which generates a new hash
for every request.

This change configures the RouterCachingAspect to use a
SimpleFile cache backend and adjusts the aspect to use the
persistence manager in order to convert objects to their
identifiers before creating cache entries.

This also adds a signal to the FunctionalTestCase base
class that flushes the routing caches on teardown.

Furthermore this adds two convenience methods
getLastMatchedRoute() and getLastResolvedRoute() to the router
which should make debugging and testing easier.

Change-Id: I9605731f78cb1be9b0fb5c439d7149a676b6ccb7
Fixes: #38172
Releases: 1.1, 1.2

Revision c1103615
Added by Bastian Waidelich about 3 years ago

[BUGFIX] Log route values if a route can't be resolved

This re-introduces logging if a route could not be resolved.
This behaviour was lost with I9605731f78cb1be9b0fb5c439d7149a676b6ccb7

Change-Id: Iad44b18782ea17abc4e92f6d7444fd2b5089b3e6
Related: #38172
Releases: 1.1, 1.2

Revision 0d3440fc
Added by Bastian Waidelich about 3 years ago

[BUGFIX] Log route values if a route can't be resolved

This re-introduces logging if a route could not be resolved.
This behaviour was lost with I9605731f78cb1be9b0fb5c439d7149a676b6ccb7

Change-Id: Iad44b18782ea17abc4e92f6d7444fd2b5089b3e6
Related: #38172
Releases: 1.1, 1.2

History

#1 Updated by Gerrit Code Review about 3 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12196

#2 Updated by Gerrit Code Review about 3 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12196

#3 Updated by Gerrit Code Review about 3 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12196

#4 Updated by Gerrit Code Review about 3 years ago

Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/12206

#5 Updated by Bastian Waidelich about 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Karsten Dambekalns about 3 years ago

  • Target version changed from 1.1 RC1 to 1.1 beta 3

Also available in: Atom PDF