Skip to content

Build the shield middleware once, not on each request

Latest

Choose a tag to compare

@github-actions github-actions released this 19 Nov 09:51
Immutable release. Only release title and notes can be modified.

9.0.1 (2026-11-19)

Performance Improvements

  • register ShieldMiddleware as a singleton (#49) (428808f)

The container built ShieldMiddleware again for each request: it read the shield config, resolved the encryption service, imported edge.js and built each guard. It is now a singleton, as SessionMiddleware of @adonisjs/session is. A GET request through the session and shield middleware takes about 38 µs less CPU, and the throughput went up by 26% in the benchmark of the pull request.

Full Changelog: v9.0.0...v9.0.1