I’ve to store redis key and value in redis chache. However the redisValue which I want to save is a Json string of 1976 characters length which has-> {,},[,],",-,: characters apart from numbers,alphabets. but while storing it says invalid argument.
So are any of above characters not allowed in redisValue or is there any character limit?
Or what could be possible reasons for invalid argument exception for redisvalue ?
Thanks in advance.
2
Answers
-> redis cli does not allow to enter double quotes directly. We've either use the escape sequence for it or we've to replace the double quotes with any other character and then insert it. In my case, I replaced the double quotes with $ and I was able to add json as a redisValue.
ThankYou all for the help
Assuming
RedisValue
here is from StackExchange.Redis; it is treated as opaque data transferred using the binary-safe API; there are no disallowed characters. For limits: things always get hairy for extremely large strings, due to the 2GB limit of .NET objects (including string instances), but: you’re nowhere near that. Internally, redis may have a 512MiB limit, which is on the UTF-8 encoded value.