silverstripe-framework/tests
Sam Minnée 5b7a84141b NEW: Add Hierarchy::prepopulate_numchildren_cache() (#8380)
* NEW: Add Hierarchy::prepopulate_numchildren_cache()
API: Hierarchy::stageChildren() customisations must be applied to the base class and not include record-specific behaviour.

Adds the ability to prepopulate the cache for Hierarchy::numChildren()
in a batch.

Note that this optimisation means that stageChildren() is not called on
each record in order to calculate numChildren(). This means that the
structure of the stageChildren() query must be the same for all records
and the behaviour cannot be customised only for a subclass of the base
data class. For example, apply your customisations to SiteTree and not
a subclass.

This is an useful part of optimising the query count on tree generation.
See https://github.com/silverstripe/silverstripe-framework/issues/8379

* NEW: Add Hierarchy::prepopulateTreeDataCache()

This provides a more extensible way of preopulating caches for optimised
tree generation.

Fixes https://github.com/silverstripe/silverstripe-framework/issues/8391
2018-09-25 12:25:23 +12:00
..
behat Merge branch '4.2' into 4 2018-09-06 13:26:46 +02:00
bootstrap BUG Fix incorrect assets created when ASSETS_PATH !== BASE_PATH . '/assets' 2018-02-26 13:12:08 +13:00
php NEW: Add Hierarchy::prepopulate_numchildren_cache() (#8380) 2018-09-25 12:25:23 +12:00
bootstrap.php API Refactor bootstrap, request handling 2017-06-22 22:50:45 +12:00
dump_constants.php ENHANCEMENT Log user constants during CI for debugging improvements 2017-08-23 14:23:33 +12:00
phpcs_runner.php Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00