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 4243854
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:37:54+00:00 2026-05-21T03:37:54+00:00

Redis 2.0. (Solutions for 2.2 are also interesting, but, sadly, I can’t upgrade yet.)

  • 0

Redis 2.0. (Solutions for 2.2 are also interesting, but, sadly, I can’t upgrade yet.)

I need to store some data in Redis set:

SADD mycache apple
SADD mycache orange

This cached data would be used with SINTER commands:

SADD foo apple
SADD foo pear
... later ...
SINTER foo mycache

I want to be able to create the mycache set on-demand. That is, check if set is there when SINTER is issued, and create it if it is missing.

But I can’t see how can I achieve this effectively. The only solution I see is as follows:

MULTI
EXISTS mycache
SINTER foo mycache
EXEC

…And check on client if first command returned true. Is it the best solution available?

Or maybe I am going against the Redis “way of things”?

  • 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-21T03:37:55+00:00Added an answer on May 21, 2026 at 3:37 am

    Well, I ended up using the solution included in the question. It works.

    If you know anything better than that — please post it here.

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

Sidebar

Related Questions

I need to create an match-finder system for some data set, as follows: There
If redis gets overloaded, can I configure it to drop set requests? I have
Problem I need a key-value store that can store values of the following form:
I'm using Redis as nosql database (and really enjoying it) but there are some
When using Redis in order to create a record you can create a hash
We need to set up a system where multiple processes are working on the
I'm looking to store time-based counters using Redis, in a Python project. I want
I've seen several solutions for doing this: Redis / Resque Delayed Job Heroku Scheduler
I have set up an instance to use as a redis worker. All ports
We need an in-memory data structure / DB server with following characteristics: stand-alone server

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.