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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:19:58+00:00 2026-05-26T18:19:58+00:00

Im using memcache to store a json, and it’s working. But the problem is

  • 0

Im using memcache to store a json, and it’s working. But the problem is that the cache size grow if I call that line above many times:

memcache.Client.add(memcache.Client(),"searchindex",json)

So I looked at the memcache viewer and the content still the same, since Im using a key that’s already on cache. But, even though the size of cache continues to increase.

  • 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-26T18:19:59+00:00Added an answer on May 26, 2026 at 6:19 pm

    First off, that’s a really odd way to invoke an instance method. Normally you would do this:

    memcache.Client().add("searchindex", json)
    

    Or simply:

    memcache.add("searchindex", json)
    

    Since add will not overwrite a key that already exists in cache, calling it repeatedly should have no impact on the behavior of your application.

    Whether or not these calls increase the cache size shouldn’t really be a concern. Memcache is designed to make memory available as it’s needed by your application, based on a least use algorithm. Junk memory from inert should add calls should certainly be evicted first.

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

Sidebar

Related Questions

I store instances of Domain objects in GAE's memcache using the javax.cache API. I'd
In my current project, I am using Memcache to store key-value pairs, but since
I'm using memcache to design a cache for the model layer of a web
can I store objects in the servers memory to cache data using django, or
I'm using json.org JSONObject. I've tried to serialize it to memcache and got the
I'm using memcache for caching (obviously) which is great. But I'm also using it
I have chosen to store my sessions in memcache, which is working well.... recently
I am using memcached (gem memcache-client ) in my application, but I want to
I want to start using memcache with PHP (on Ubuntu 9.10). There are lots
Currently I am using MySQLi to parse a CSV file into a Database, that

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.