I am trying to cache an array with Zend_Cache like this:
$cache = Zend_Registry::get('cache');
// $data is an array
$cache->save($data, 'externalData');
And I am getting this error:
Message: Datas must be string or set automatic_serialization = true
Even though the automatic_serialization is set tu true when initializing Zend_Cache in the bootstrap file:
protected function _initCache()
{
    $frontend= array('lifetime' => 7200,
  开发者_JS百科                   'automatic_seralization' => true);
    $backend= array('cache_dir' => 'cache');
    $this->cache = Zend_Cache::factory('core',
                                       'File',
                                       $frontend,
                                       $backend);
}
What could cause this error message?
Maybe you just made a copy-paste error or a typo error, but, in the code you posted, you have :
$frontend= array('lifetime' => 7200,
                 'automatic_seralization' => true);
i.e. you are setting automatic_seralization to true, and not automatic_serialization : note the i in ser-i-alization.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论