[TASK] Use a Identity Map for Record objects
When loading Record objects, and we use Relations in one of the next patches, the main issue will be that we might run in recursions when fetching relations. This can be resolved by re-using created Record objects by utilizing the Identity Map pattern (https://en.wikipedia.org/wiki/Identity_map_pattern) which keeps track (context-wise) of the loaded records. In a way to unify this logic, the "RecordRememeberer" for Page Module has now been removed as this is the exact purpose of the Identity Map. The next step is to actually utilize the Record API in the Page module replacing arrays there completely. Resolves: #104367 Related: #103783 Releases: main Change-Id: Idd56a49c421fd722ed35eedded365420a7479bea Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85047 Reviewed-by:Benni Mack <benni@typo3.org> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/backend/Classes/View/BackendLayout/ContentFetcher.php 3 additions, 2 deletions...ext/backend/Classes/View/BackendLayout/ContentFetcher.php
- typo3/sysext/backend/Classes/View/BackendLayout/RecordRememberer.php 0 additions, 49 deletions...t/backend/Classes/View/BackendLayout/RecordRememberer.php
- typo3/sysext/backend/Classes/View/Drawing/BackendLayoutRenderer.php 9 additions, 4 deletions...xt/backend/Classes/View/Drawing/BackendLayoutRenderer.php
- typo3/sysext/backend/Classes/View/PageLayoutContext.php 11 additions, 0 deletionstypo3/sysext/backend/Classes/View/PageLayoutContext.php
- typo3/sysext/backend/Tests/Functional/View/Drawing/BackendLayoutRendererTest.php 10 additions, 10 deletions...sts/Functional/View/Drawing/BackendLayoutRendererTest.php
- typo3/sysext/core/Classes/Domain/Persistence/RecordIdentityMap.php 79 additions, 0 deletions...ext/core/Classes/Domain/Persistence/RecordIdentityMap.php
- typo3/sysext/core/Classes/Domain/RecordFactory.php 2 additions, 0 deletionstypo3/sysext/core/Classes/Domain/RecordFactory.php
- typo3/sysext/frontend/Classes/Content/RecordCollector.php 9 additions, 7 deletionstypo3/sysext/frontend/Classes/Content/RecordCollector.php
- typo3/sysext/frontend/Classes/DataProcessing/PageContentFetchingProcessor.php 3 additions, 0 deletions...d/Classes/DataProcessing/PageContentFetchingProcessor.php
Please register or sign in to comment