On Fri, Sep 12, 2008 at 11:23 PM, ryanw <[EMAIL PROTECTED]> wrote:
>
> I am trying to use the Zend_Cache engine with the frontend page and backend
> memcached but I am getting an error. The pages cache works properly when
> using the file backend I figured I could just change the backend out and it
> should work. Here is the error that I get:
>
>
> Fatal error: Uncaught exception 'Zend_Cache_Exception' with message
> 'Incorrect option name : 0' in .../lib/Zend/Cache.php:141 Stack trace: #0
> .../lib/Zend/Cache/Backend.php(108): Zend_Cache::throwException('Incorrect
> optio...') #1 .../lib/Zend/Cache/Backend.php(69):
> Zend_Cache_Backend->setOption(0, Array) #2
> .../lib/Zend/Cache/Backend/Memcached.php(99):
> Zend_Cache_Backend->__construct(Array) #3 .../lib/Zend/Cache.php(124):
> Zend_Cache_Backend_Memcached->__construct(Array) #4
> .../websites/pornomovies.com/index.php(49): Zend_Cache::factory('Page',
> 'Memcached', Array, Array) #5 {main} thrown in .../lib/Zend/Cache.php on
> line 141
>
> And here is my contructor:
>
> $frontendOptions = array(
> 'lifetime' => 1200,
> 'debug_header' => true, // for debugging
> 'automatic_cleaning_factor' => 0,
> 'regexps' => array(
> // cache the whole IndexController
> '^/$' => array('cache' => true),
> )
> );
>
> $backendOptions = array(
> array('host' => 'localhost','port' => 11211, 'persistent' => true)
> );
>
> // getting a Zend_Cache_Frontend_Page object
> $cache = Zend_Cache::factory('Page',
> 'File',
> $frontendOptions,
> $backendOptions);
>
> $cache->start();
You are using File, not Memcache(d).