Advertising sustains the DA. Ads are hidden for members. Join today

Hux Optimized Mode

Last updated on
23 April 2022

Hux' optimized mode provides an option geared towards being developer friendly or optimized for production use.

By default, optimized mode is off. This mode allows developers to add more hooks/alters/replacements to existing hooks classes without needing to clear caches for the entire site.

When optimized mode is on, Hux will cache all Hux hooks/alters/replacements in both a fast (think APCU) and a backed slow backend (Database) using Drupal's builtin ChainedFast.

Normally there is not a severe performance penalty if optimized mode is left off. It simply provides small gains in performance, usually in the range of <10ms per request.

To control whether Hux optimized mode is on or off, simply add this to your site services.yml file:

parameters:
  hux:
    optimize: true

Help improve this page

Page status: No known problems

You can: