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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:35:49+00:00 2026-05-20T06:35:49+00:00

I just installed memcached and tried a couple of sample code found on php.net

  • 0

I just installed memcached and tried a couple of sample code found on php.net
but since I’m a newbie on this, i dont get the advantage of using it, where I can store the same data in a session or cookie..

for instance I run a real estate website where users do a lot of searches / queries to mysql and lot of ajax queries

as far as i understood i can chace those queries…but what happen if the results change because someone posted a new ad? how can memcached know that?

so, question is, why should I use it and in wich occasions?

thanks!

  • 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-20T06:35:50+00:00Added an answer on May 20, 2026 at 6:35 am

    You have to know what to cache and what not to cache. To take your example, say your site gets insanely poplar and you have a 100 million real estate listings. And you have millions of users doing searches and looking at the details. That’s a lot of queries!

    Enter Memcached, if you (for example) cache the detailed listing view in Memcached by saving the results of that query, you cut down the amount of load. This is because, apart from the first time where the server queried MySQL, every other hit is on Memcached.

    Another thing you could do is save the results of the searches by storing the search query hash as the key. Depending on how much memory you have, that again would decrease load because Memcached is simply serving up the cached pages.

    It’s up to you to decide how long you’re going to keep the cache as well as how your invalidation scheme would run (maybe clear the key when you add a new property, or only updates once a day).

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

Sidebar

Related Questions

Just installed AnkhSVN and I see the equivalent of svn up but I'd prefer
I just installed the first release candidate of Python 3.0 and got this error
I just installed an application on a win2003 server and I'm getting this error:
I just installed Eclipse Helios (Java EE edition) and tried to install the Google
I just installed Python 2.7, but IDLE is currently broken on OS X 10.6.4.
Just installed the latest SDK for iPhone 2.1. When I go to File ->
I just installed Glassfish V2 on my local machine just to play around with
I just installed Ubuntu 8.04 and Eclipse. I made a very simple Hello World
I just installed 'Visual C# 2008 Express Edition' and 'Visual Web Developer 2008 Express
I just installed Java 1.6_07 so I could try profiling with VisualVM. It tells

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.