# Limiter v3\.1\.0 Release: Dry Run Mode, limit:exceeded Event, and Safer Redis clear\(\)

Canonical URL : https://adonisjs-signal.jrmc.dev/insights/383894a7-4b0b-48e0-b96a-f002bb9b46a6
Source release or documentation date : 2026-11-19T09:32:59.000Z
Category : release | Developer impact : medium
Breaking change: yes
Action required: yes
Affected packages : @adonisjs/limiter

The @adonisjs/limiter package version 3\.1\.0 introduces a new dry run mode for HTTP limiters that counts requests without rejecting them, emitting a 'limit:exceeded' event with a dryRun flag\. The package now emits a 'limit:exceeded' event whenever a request is rejected, useful for logging or metrics\. Additionally, the Redis store's clear\(\) method no longer flushes the entire database but only deletes keys under the configured keyPrefix, preventing unintended data loss\. Calling clear\(\) without a keyPrefix now throws an error\.

## What this means for your code

Developers can now monitor rate limit exceedances via the new 'limit:exceeded' event to log or collect metrics without delaying requests\. The dry run mode allows testing limits on live traffic without enforcement, facilitating safer rollout of rate limits\. The change to clear\(\) behavior prevents accidental flushing of unrelated Redis data, which may require review of existing usage if clear\(\) was called on a Redis store without a keyPrefix, as this now throws an error\.

## Suggested actions

- Update code to listen for the 'limit:exceeded' event if logging or metrics are desired\.
- Use \.dryRun\(\) on HTTP limiters to test rate limits without rejecting requests\.
- Review usage of Redis store's clear\(\) method; ensure keyPrefix is set or avoid calling clear\(\) to prevent errors\.
- Test rate limiting behavior with the new dry run mode and event emissions to confirm expected operation\.

## Original sources

- [Add the limit:exceeded event and a dry run mode, and stop clear\(\) from flushing Redis](https://github.com/adonisjs/limiter/releases/tag/v3.1.0)

AI-generated analysis based on the linked sources. Check the original documentation before changing your application.
