Reputation: 37
I have a web application built using PHP and MySQL. Now the database is hitting the red line due to the load. I am trying to use phpfastcache to store set of data into redis and reduce the load on the DB. The data set is from multiple tables and may take up to 15 seconds to fetch. But I am getting requests from client every 2-3 seconds. So there can be 5-6 requests while the cache is building. That is when the existing cache is expired and new one is getting build.
These requests are again trying to build the cache, that will add up to the cache building time.
Is there any way to workaround this problem?
Thanks :)
Upvotes: 0
Views: 418
Reputation: 454
As of the V6 there's a new Cache Slam option that help you to prevent those kind of problems.
Cheers, Georges
Upvotes: 0