Issue Feature Closed

#81389Injected ReflectionService without call to initialize/shutdown

Alexander Opitz 05/31/17, 14:11 updated 10/18/17, 22:06

Description

There are different classes which get the ReflectionService via inject but do not call initialize and shutdown, which results in cache savings for other Extbase Extensions afterwards.

Following scenario:

I’ve in frontend a fluid page which uses ViewHelpers and an extbase plugin. On my example page is dynamic content and so it isn’t cached.

  • The AbstractViewHelper gets the ReflectionService injected, no initialize and shutdown is called.
  • AbstractViewHelper->registerRenderMethodArguments() calls getMethodParameters
  • As no data is in cache, it is generated and in ReflectionService dataCacheNeedsUpdate is set to TRUE;
  • The Extbase Extension is called, ReflectionService is initialized but dataCacheNeedsUpdate stays TRUE
  • On calling ReflectionService Shutdown the loaded (and not changed) cache is written to the cache … which isn’t needed.
  • Later AbstractViewHelper->registerRenderMethodArguments() calls again getMethodParameters which again do not found some parts, as the initialize of the ExtbaseExtension overwrote the data.
  • Again ReflectionService dataCacheNeedsUpdate is set to TRUE;
  • Now Second part of my Extension is started with initialize/shutdown
  • And again a normally clean cache is written again as dataCacheNeedsUpdate is TRUE

Setting dataCacheNeedsUpdate to false in ReflectionService->initialize() helps here (the multiple cache loading should be handled in parent task)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.