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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:56:57+00:00 2026-05-23T17:56:57+00:00

The title of this question might be confusing but the problem is simple. I’m

  • 0

The title of this question might be confusing but the problem is simple.

I’m using Zend_Cache with memcached as a backend. I have two module called “Last articles” and “Popular articles”. Both of this module are on every pages and use a similar query such as :

Select * from table where status = 'published' and category = '' order by dateCreated|/popularity\

My table have 1.5 million rows so far. I have indexes on every field that I’m using in the previous query.
I cache the recent articles for 1hour and the popular for 4hours. I have 4 web server (php5/apache2) and 1 database server (mysql). The table engine is innoDB.

The problem some time my cache expire right in the middle of a heavy load, which make my web site unavailable until those modules are cached again. I could had a new MYSQL server.

But is there a way to handle the caching in a smarter way? Like for example the server1 will try to refresh the cache while server 2,3 and 4 will still use the same value out of the cache.

I can write some code to do that, but I was wondering if there is way to do that directly with Zend_Cache? Of if there is a design pattern that i could apply to my problem?

[EDIT] I want something that I could scale up to 100 servers

  • 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-23T17:56:58+00:00Added an answer on May 23, 2026 at 5:56 pm

    I finally implemented a class that inherit from Zend_Cache_Backend_Libmemcached
    I’m overriding the load() method.

    Each of my server has there hostname finishing by a set of number such as serv01, serv02, serv03, serv04.
    The main idea is taht each server will think that the cache expired at different time. For example serv01 will think that the cache is expired 20minutes before it actually expires, serv02 will be 15minutes, serv03 10minutes and serv04 5minutes.

    By doing so my cache will never be refresh at the same time on each server, and if one server is down the cache will be refresh by another server.

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

Sidebar

Related Questions

I'm not really sure how to title this question but basically I have an
The title of this question might be a bit off but its the closest
This question might appear very simple, but i haven't found an answer yet, so
The original question: The title of this question might be a bit clumsily phrased,
i didn't really know how to title this question, but here's a thing that
The title of this question isn't so clear, but the code and question is
This may be the simplest question ever, but try as I might I simply
Update: this question, including the title, was rephrased, see history for details I know
Title is the entire question. Can someone give me a reason why this happens?
I have the HTML given below: <ul id=thumbsPhotos> <li src=/images/1alvaston-hall-relaxing-lg.jpg onclick=updatePhoto (this.title)><img src=/images/1alvaston-hall-relaxing-sl.jpg width=56

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.