Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for UNLINK #292

Closed
govindbalaji-s opened this issue Jan 20, 2023 · 2 comments · Fixed by #293
Closed

Support for UNLINK #292

govindbalaji-s opened this issue Jan 20, 2023 · 2 comments · Fixed by #293

Comments

@govindbalaji-s
Copy link

govindbalaji-s commented Jan 20, 2023

https://redis.io/commands/unlink/
I can't see how this can be made to behave any differently than DEL in java. But I feel even an implementation that just calls DEL instead will also be helpful. I can go ahead and implement this, if this is fine.

@inponomarev
Copy link
Collaborator

Hi, thanks for the suggestion! AFAICS UNLINK is there just for better performance, so for testing purposes an alias for DEL will do. It is trivial, I implemented it in #293

Expect the release soon.

As a temporary workaround, I suggest you to use a RedisCommandInterceptor (see README) with the following:

(state, roName, params) -> {
        if ("unlink".equalsIgnoreCase(roName)) {
            return MockExecutor.proceed(state, "del", params);
        } else {
            return MockExecutor.proceed(state, roName, params);
        }

@govindbalaji-s
Copy link
Author

Thanks Ivan. I have used the same interceptor for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants