Hi Arthur, Saving such results can lead to a huge amount of cached data. I'd first check the more frequent ones (if applicable) or the more expensive in terms of query time.
In any case a suggestion would be to add as much RAM as possible and store the cache files in a 'ram disk' so the operation of creating/erasing is fast and cheap. This will only work well if the required size is < the physical memory. On Wed, May 27, 2009 at 2:01 PM, Arthur Richards <[email protected]>wrote: > I am preparing to use Zend_Cache to help reduce database hits for > retrieving data that very rarely changes. I am curious to hear about > people's experiences with Zend_Cache as well as to see if there are > any recommendations for which backend to use.I am curious to hear > about people's experiences with Zend_Cache as well as to see if there > are any recommendations for which backend to use. > > The idea is to store data results for any combination of user > submitted parameters. If a particular combination of parameters have > been submitted before, then there would be a hit to the cache, > returning corresponding data. If not, then the database would be > queried and results cached. The db will contain millions of rows of > somewhat normalized data - queries would likely leverage indexes well > and complex joins will likely need to be utilized. Initially, the web > and db servers are likely to exist on the same physical machine > although it is probable that we will be able to separate the servers > in the near future. I am currently leaning towards a file or sqlite > backend - i will not have access to memcache but could conceivably set > up apc. I have a hunch, however, that some sort of disk rather than > memory based caching will be necessary due to the potentially large > volume of cached data. > > Can anyone make recommendations about which back-end to use or even if > I'd be better off just relying on the DB rather than a cache? > > Thanks very much! > Arthur Richards > > -- > Colingo Labs, LLC > 582 Market Street > Suite 511 > San Francisco, CA 94104 > Web: http://www.colingolabs.com > Skype: awjrichards > Office: 415.287.3374 >
