[TASK] Remove instance state from `ResourceFactory`
Stateful services come with a lot of drawbacks and needs to be avoided. The `ResourceFactory` holds state in form of internal instance cache properties, which cannot be cleared. Clearing these cache states can be a vital task in long running worker processes, migration tasks or similar things. In the current form, class instances retrieved from the Symfony DI container are not set into the internal GeneralUtility instance cache and cannot be removed from it. Even if that would be possible, the state would be hold in the DI container due to the nature of being a shared service. This change modifies the `ResourceFactory` to use the `core.runtime` transient cache instead, which allows clearing the state if needed. Note that removing `SingletonInterface` from `ResourceFactory` is not yet possible and needs some other changes first. Resolves: #104728 Releases: main Change-Id: I6a632722ae3b3e28c0cf53301f9d8f0b2c103c4f Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85775 Reviewed-by:Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Garvin Hicking <gh@faktor-e.de> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Garvin Hicking <gh@faktor-e.de>
Please register or sign in to comment