0

which is the best way to use a java object as key in Redis? I was thinking of serializing the object (through FST or KRYO). Is this the best way? Should i use an hash?

Thanks

1 Answer 1

1

I don't think it's a good idea using object byte array as the key, because Redis has key size limited, and calculate byte array hash code as the real key, so you should using the unique key stand for the object, smaller key size can improve performance.

Sign up to request clarification or add additional context in comments.

1 Comment

Just note, key/value size limit is 512MB.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.