mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
fdcd7a2e60
On sites with lots of modules, and pages with plenty of database queries, DataObject::custom_database_fields() can be called thousands of times, and slow down page render times. This fixes it so the fields are cached by class in a static variable, and are cleared when reset() is called on the DataObject.