de en
← Back to Articles

New in Craft CMS 2.6

Craft CMS 2.6 Teaser
Yesterday Craft CMS 2.6 and Craft Commerce 1.1 were released. The biggest new feature in this release is the support of Eager Loading for elements. Developers are also happy about new hooks.

Eager Loading

Eager Loading is designed to drastically reduce the number of SQL queries needed to render pages with nested element queries. Eager Loading is the opposite of lazy Loading, as it efficiently fetches all foreseeably required data in the query.

The following elements support eager Loading:

  • Relationships per entries, files, users, tags, categories, and commerce product fields
  • Matrix blocks
  • Commerce product variants
  • Image transformation indices

Furthermore, 3rd party elements can use Eager Loading via the new getEagerLoadingMap() method. 3rd party field types can provide eager Loading if they use the IEagerLoadingFieldType interface.

Others

Photo from  Thomas Sausen<

Self-employed web developer from Germany who started with WordPress websites in 2005, then moved to ExpressionEngine and lost his heart to Craft CMS in 2013. As the founder of Craftentries, he has been covering the Craft ecosystem since 2015.

Thomas Sausen Web Developer