How to set and get objects in Redis ? (vb.net)

61 views
Skip to first unread message

antoine zombralis

unread,
Jun 18, 2019, 2:14:34 AM6/18/19
to Redis DB
Hello,

I expose the situation : I'm working with VB.NET and i have an SQL Server query that returns a tuple that I use to fill an object that I use later.
When i cache this object via my set command (.set("nameKey",myObject) the first parameter is the name of my key and the second the value) and then i get it, I get the type of this object but i'm looking to get my whole object instead of its type.
I also thought about using hashes, but I have queries where I get a lot of informations, something that would take me a lot of time to reproduce with hashes.

What would be the solution to my problem ?

赖信桃

unread,
Jul 14, 2019, 3:09:20 PM7/14/19
to Redis DB
Hi antoine,

For SET command's return value, it is what you give to Redis, so I suppose you already had the object, I don't understand why you ask Redis for that. Besides, Redis' SET command simply returns a string "OK", I suppose the returned type is your client's behavior.

在 2019年6月18日星期二 UTC+8下午2:14:34,antoine zombralis写道:
Reply all
Reply to author
Forward
0 new messages