Reputation: 3038
I am making two ajax calls in my rails application, 1st ajax call saves a key value pair on redis and see that the value is saved correctly.
But the next ajax call i make and try to retrieve the key i dont get the desired value.
I am setting the value like
$redis.setnx("#{id}_number,"10")
and trying to get the value like
$redis.get("#{id}_number") is returning nil
not sure what am i doing wrong, any help would be appriciated. Thanks.
Upvotes: 0
Views: 96
Reputation: 1580
You have one quote missing, the correct syntax is $redis.setnx("#{id}_number", "10")
Upvotes: 1