Problem with Zend_Cache

2 messages Options
Embed this post
Permalink
samuel () Problem with Zend_Cache
Reply Threaded More More options
Print post
Permalink
I am french and not very good in English
I have a problem with zend cache.
I put cached by a remote resource file_get_contents.

if(!$data = $cache->load($key)) {
        $file = 'http://www.test.com/........';
        if (!@$data = file_get_contents($file, 0, $this->context)) {
                $this->_logger->log('Problème sur la récupération du flux : ' . $file, Zend_Log::ALERT);
                throw new App_Exception('Flux introuvable');
        }
        $cache->save($data, $key);
}
return $data;

The remote resource may take a long time to reach me (by example 2 seconds) and as I have a lot of traffic on the site, I find myself with a significant number of loading the resource as it has not was being cache.

eg I have a user every 100ms requesting the resource and this resource is cached in 500ms when I asked 5 times the resource.

How can I do to not to have x user load this resource until it was cached?
Christoph Dorn () Re: Problem with Zend_Cache
Reply Threaded More More options
Print post
Permalink
This support forum is for FirePHP related issues only.

Please post your question to the Zend Framework general mailing list.