Skip to content

feat(redis): add support for watch/unwatch with keyspace notifications#742

Open
saurlax wants to merge 4 commits intounjs:mainfrom
saurlax:main
Open

feat(redis): add support for watch/unwatch with keyspace notifications#742
saurlax wants to merge 4 commits intounjs:mainfrom
saurlax:main

Conversation

@saurlax
Copy link

@saurlax saurlax commented Feb 10, 2026

Resolves #739

Feature: Redis keyspace notifications and watch support

  • Added a watch method to the Redis driver, allowing clients to subscribe to Redis keyspace notifications for real-time updates and removals of keys. The driver attempts to enable keyspace notifications at runtime and maps Redis events to update or remove actions. An unwatch method is also provided to unsubscribe and clean up resources.
  • Updated the documentation to describe the new watch/unwatch support, including configuration requirements and event mapping.

Testing

  • Enhanced the Redis driver tests to use a real Redis instance if VITE_REDIS_URL is set, or fall back to ioredis-mock otherwise. Added tests for the new watch and unwatch functionality.
  • Tests all passed on real Redis instance and ioredis-mock.

@saurlax saurlax requested a review from pi0 as a code owner February 10, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow .watch on redis driver

1 participant