Zend_Cache - "veriler dize veya set automatic_serialization = true olmalı"

1 Cevap php

Böyle Zend_Cache ile bir dizi önbelleğe çalışıyorum:

$cache = Zend_Registry::get('cache');
// $data is an array
$cache->save($data, 'externalData');

Ve ben bu hatayı alıyorum:

Message: Datas must be string or set automatic_serialization = true

Önyükleme dosyasında Zend_Cache başlatırken automatic_serialization true tu ayarlanmış olsa bile:

protected function _initCache()
{
    $frontend= array('lifetime' => 7200,
                     'automatic_seralization' => true);
    $backend= array('cache_dir' => 'cache');
    $this->cache = Zend_Cache::factory('core',
                                       'File',
                                       $frontend,
                                       $backend);
}

Ne bu hata iletisine neden olabilir?

1 Cevap

Belki de sadece bir kopyala-yapıştır hatası ya da bir yazım hatası hata yaptı, ama deftere kodu, sahip:

$frontend= array('lifetime' => 7200,
                 'automatic_seralization' => true);

ser-i-institutionalization yılında i Not: yani automatic_seralization true ayarı, ve automatic_serialization edilir.