Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6585255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:38:21+00:00 2026-05-25T16:38:21+00:00

Is there anyway to retrieve all keys that start with a particular string in

  • 0

Is there anyway to retrieve all keys that start with a particular string in redis?

I want to do something like storing:

'thing1:userid1' : ' ';
'thing1:userid2' : ' ';
'thing2:userid1' : ' ';
'thing2:userid2' : ' ';

and retrieve every thing1 without having to know every user.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:38:21+00:00Added an answer on May 25, 2026 at 4:38 pm
    REDIS.keys("thing1:*")
    

    However, you might want to consider using a map.

    REDIS.hset("thing1", "user1", "")
    REDIS.hset("thing1", "user2", "")
    REDIDS.hgetall("thing1")
    

    Do be careful with this in production. Redis can only process one command at a time, and KEYS is very slow. It has to look at every key in the entire database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there anyway to retrieve a list or table or something of all of
Is there any way to retrieve all friends in a particular network? For example,
I want to retrieve all rows of a particular user with limit 0,x.. So
Let's say that I have the methodInfo for something like Nullable<int>.HasValue . Is there
Is there anyway to retrieve a HTML element's class or ID in the controller
Is there anyway to scale an image then display in jsp page? When retrieve
In the table ReservationWorkerPeriods there are records of all workers that are planned to
I wanted to know is there any way to retrieve all the handles associated
Is there anyway to load a URL via Python and then retrieve a list
Is there any way to retrieve all upper configs which influence on my web-application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.