I need help finding the right caching solution for a customer site. The current site is centoOS, php, mysql, apache using smarty templates (I know they suck, but it was created by someone else). Modern models / methods use a pretty good OO structure, but there are many ways to perform some simple page functions. I am looking for an attempt to find some kind of caching solution, but I am new when it comes to this, and I donβt know what is available that matches the current site setting.
This is an auction type site with 10 auctions displayed on one page at a time - the time and current bid on each auction, updated via an ajax call that returns json every 1 second (this is a penny auction site such as beezid.com, so updates every second are needed). As you can see, if a site receives any traffic, the number of simultaneous requests can be huge. Obviously, this data changes every second because the returned json data has an updated time remaining at the auction, and possibly updated bid amounts and bid users for each auction.
What I want is the ability to cache certain pages for a specific period of time or based on another modified variable. For example, caching memory on a page that displays 10 auctions, and only updating this copy of the cache at the end of one of the auctions. Or even the script above that returns json string data every second. If I could cache the first request for this page in memory, execute the following requests from memory, and then reseal it again after 1 second, which can potentially significantly reduce the load on the server. But I donβt know if this is possible, or if the overhead of doing something like that exceeds any cost of downloading the request.
I looked at a bit of xcache, but couldn't find a way that I could set a specific caching time on a specific page or based on other variables?!? Maybe I missed something, but does anyone have any recommendations on a caching scheme that will work for these requirements?
Mucho thanks for any contribution you may have ...
source share