Link to home
Start Free TrialLog in
Avatar of namsu55
namsu55Flag for United Kingdom of Great Britain and Northern Ireland

asked on

How can I find keys in Redis

Using Redis I store a KEY and VAlUE in this example structure :

KEY=2012-01:DAY:01   VALUE=BYTES_IN

What I am trying to do is find what keys belong in the DAY tree (01, 02, 03). These represent dates but suppose one day does not exist I don't want to increment the counter in a loop and assume it exists.

By the way in PHP I have tried to return the contents in an array without specifying the full key and it returns nothing. I thought Redis might allow for a partial key and return the remaining structure but this is not the case.

$check = $redis->smembers("$currentUserVnoId:$exampleSelection");

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of namsu55
namsu55
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial