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

  • Home
  • SEARCH
  • 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 8039949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:44:19+00:00 2026-06-05T03:44:19+00:00

I have a memcache backend and i want to add redis for adding the

  • 0

I have a memcache backend and i want to add redis for adding the meta data of the keys of the memcache.
Meta data is as follows:
Miss_count: The number of times the data was not present in the memcache.
Hash_value: The hash value of the data corresponding to the key in the memcache.

Data in memcache : key1 ::: Data
Meta data (miss count) : key1_miss ::: 10
Meta data (hash value) : key1_hash ::: hash(Data)

Please provide help as in which data store is preferable as when i store the meta data in the memcache itself, the meta data is removed well before its expiry time as the size of the meta data is small and the slab allocation is allocating a small memory chuck to it.

  • 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-06-05T03:44:21+00:00Added an answer on June 5, 2026 at 3:44 am

    If I understand your use case correctly I suspect Redis might be a good choice. Assuming you’ll be periodically updating the meta data miss counts associated with the various hashes over time, you’d probably want to use Redis sorted sets. For example, if you wanted the miss counts stored in a sorted set called “misscounts”, the Redis command to add/update those counts would be one and the same:

    zadd misscounts misscount key1

    … because zadd adds the entry if one doesn’t already exist or overwrites an existing entry if it does. If you have a hook into the process that fires each time a miss occurs, you could instead use:

    zincrby misscounts 1 key1

    Similar to the the zadd command behavior, zincrement will create a new entry (using the increment value as the count) if one doesn’t exist, or increment the existing count by the increment value you pass if an entry does exist.

    Complete documentation of Redis commands can be found here. Descriptions of the different types of storage options in Redis is detailed here.

    Oh, and a final note. In my experience, Redis is THE SHIT. Sorry to curse (in caps), but there’s simply no other way to do Redis justice. We call our Redis server “honey badger”, because when load starts increasing and our other servers start auto-scaling, honey badger just don’t give a shit.

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

Sidebar

Related Questions

I have substitute my memcache with Redis. I use the phpredis client and the
We have found that with our memcache some keys tend to be lost. To
I have a CodeIgniter project. I want to use Memcache, but I don't want
At times I have very high memcache current connections - how can I tell
Does the memcached (not memcache) extension exist for Windows? I have looked through old
We have a webapp which uses memcache to store objects temporally. We are adding
Does rails have any in-memory caching option, other than me having to install memcache/redis?
Need some help about with Memcache. I have created a class and want to
I use the memcache extension for python, and I have a very strange problem.
I currently have about 650,000 items in memcached (430MB memory used) and the number

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.