silverstripe-framework/docs/en
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
..
_images Update main.php path to support framework in vendor 2017-10-03 09:03:37 +13:00
00_Getting_Started Update 04_Directory_Structure.md 2018-09-06 11:43:49 +12:00
01_Lessons Removed deprecated tutorials from docs 2017-12-19 11:45:27 +13:00
02_Developer_Guides FIX Don't flush manifests in tests by default 2018-09-24 18:12:35 +12:00
03_Upgrading Update index.md 2018-08-01 16:30:18 +12:00
04_Changelogs NEW: Add Hierarchy::prepopulate_numchildren_cache() (#8380) 2018-09-25 12:25:23 +12:00
05_Contributing DOCS Clarified latest vs. next 2018-09-13 08:11:07 +12:00
index.md Docs: Remove forum and IRC references 2017-12-19 11:45:27 +13:00