Skip to content

Conversation

@gisu1102
Copy link

@gisu1102 gisu1102 commented Jan 5, 2026

Closes #2106

Motivation

RedisKeyExpiredEvent<T> declares a generic type parameter that is not used anywhere in the current API.
The presence of <T> suggests type safety that the event does not actually provide, which can be confusing for users.

Changes

  • Removed the unused generic type parameter from RedisKeyExpiredEvent
  • Kept the existing runtime behavior unchanged (getValue() continues to return Object)

Rationale

The original issue outlines two possible directions.
This PR intentionally takes the minimal approach by removing the unused generic parameter.

Implementing a typed getValue(): T would require additional design decisions around
value deserialization and type resolution, which felt out of scope for a small cleanup.
Removing the unused generic improves API clarity without introducing new semantics.

Compatibility

This is a source-level incompatible change for code explicitly using RedisKeyExpiredEvent<T>.
However, since the generic parameter was unused and did not provide actual type safety,
the migration impact is minimal and runtime behavior remains unchanged.

Tests

  • Existing unit tests pass

Signed-off-by: gimgisu <gisu1102@gmail.com>
@gisu1102 gisu1102 force-pushed the remove-unused-generic-rediskeyexpiredevent branch from 0b46d97 to c13bfb1 Compare January 5, 2026 18:51
@mp911de mp911de added the status: blocked An issue that's blocked on an external project change label Jan 6, 2026
@mp911de
Copy link
Member

mp911de commented Jan 6, 2026

That's an API change that we need to wait with, otherwise, existing application code will fail to compile.

@gisu1102
Copy link
Author

gisu1102 commented Jan 6, 2026

Thanks for the clarification.
Understood — this is an API-breaking change and should be deferred to the next major release. Happy to revisit when work on the next major version starts.

@mp911de mp911de added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: blocked An issue that's blocked on an external project change type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RedisKeyExpiredEvent has an unused generic

3 participants