[FEATURE] Cache negative ux_* look up in autoloader
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 11 Jun 2012 19:16:21 +0000 (21:16 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 23 Jun 2012 17:30:00 +0000 (19:30 +0200)
commitc50007f71906f39fd5fb23dd043723ba4f20545f
treecde5f26fcd84f4892b5b19b2c20a995ed78db749
parent1c175820114bd011c4c5c45e6b7a30b031f3109a
[FEATURE] Cache negative ux_* look up in autoloader

For every class instance that is requested via
t3lib_div::makeInstance(), a lookup for ux_"classname" is done
and that class is instantiated if it exists, instead of the original
class. If no ux_ class is found with class_exists(), the requested class
is instantiated. This is the basic "XCLASS" handling in the core.

The patch adds autoloader rows for unsuccessful (NULL) ux_* lookups to the
autoloader cache file. The file is updated during shutdown. This way the
information a XCLASS does NOT exist is cached between consecutive calls.
This leads to a performance improvement and is an advantage over the
current makeInstance class name cache that worked only for one call.
The old "cache for one call only" code is dropped with the patch.

Change-Id: I70573146600d658d218dc9b31694748341fc7a20
Resolves: #37915
Releases: 6.0
Reviewed-on: http://review.typo3.org/11943
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
t3lib/cache/class.t3lib_cache_factory.php
t3lib/class.t3lib_autoloader.php
t3lib/class.t3lib_cache.php
t3lib/class.t3lib_div.php
tests/Unit/t3lib/class.t3lib_autoloaderTest.php