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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:24:48+00:00 2026-06-13T14:24:48+00:00

Memcache is one of those things where the solution could be absolutely anything, and

  • 0

Memcache is one of those things where the solution could be absolutely anything, and no one ever really gives a decent answer, maybe because there is none. So I’m not looking for a direct answer, but maybe just something to get me going in the right direction.

For a typical request, here is my AppStats info:

enter image description here

So, out of a total 440 ms request, I spend 342 ms in memcache. And here I figured memcache was supposed to be lightning fast. I must be doing something wrong.

Looking at my memcache statistics in my admin console, I have this:

Hit count:  3848
Miss count: 21382
Hit ratio:  15%

I’m no expert on this stuff, but I’m pretty sure 15% is terrible.

The typical request above is a bit too detailed to explain, but basically, I create and put a new entity, which also updates and puts a parent entity, which also updates and puts any users associated with the parent entity.

Throughout all this, I always get by key, never query. Oh and I’m using NDB, so all the basic memcache stuff is handled automatically. So I never actually touch memcache manually on my own in my code.

Any ideas?

Edit: Here is the breakdown of my request

enter image description here

So I only have 2 datastore gets and 2 puts. The rest is automatically handled memcache stuff. Why is it doing so much work? Would I be better off handling this stuff manually?

  • 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-13T14:24:49+00:00Added an answer on June 13, 2026 at 2:24 pm

    Let’s take a closer look at your data. Seven memcache writes took as much time as two datastore writes. This actually proves that memcache is, like, 3.5 times faster than Datastore.

    If a typical request to your application requires updates of at least three database entities–followed by an update of more entities (the users associated), you can’t make this operation “lightning fast.” Memcache helps when you read entries much more frequently than you write them. If the amount of reads and writes to a User’s record are on par, you should consider turning cache off for this model.

    You can also try asynchronous operations and task queues. From your description, it looks like you try to first update the entity, and update its parent only after the update completes because it’s natural. You may run these concurrently; this probably will require some refactoring, but it’s worth it.

    Second, updating “all the associated users” may be, perhaps. deferred to a task spawned in background; Task Queues have a very convenient interface for this. The “associated users” won’t be updated immediately, but they probably don’t need to! However, the latency of your request will be less then.

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

Sidebar

Related Questions

How would one return all the values stored within the memcache? I have tried
i want to know if i can use memcache, but im only using one
According to the Google AppEngine documentation, one should import memcache like this: from google.appengine.api
Memcached is a great scalable cache layer but it have one big problem (for
I am trying to close a memcached connection to start a new one. But
I am new to memcache of GAE and I need a help in this.
How can I use memcache in Joomla? I'm a newbie in this field so
I use the memcache extension for python, and I have a very strange problem.
I have substitute my memcache with Redis. I use the phpredis client and the
I've downloaded memcache.php version 3.0.6 from there and out of the box (after defining

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.