Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [ZF] Zend_Cache_File
Forum PHP.pl > Forum > PHP > Frameworki
Apo
Witam

Mam problem z Zend_Cache_File. Chcialem zrobić cache pliku xml na tej zasadzie ze kiedy zostanie zmodyfikowany masterFile to cache zostanie usuniete i utworzone nowe.
Mam taki kod:

  1. <?php
  2. $controller = $this->request->getControllerName();
  3. $file = $this->config->auth->path . $controller . '.xml';
  4. $frontendOptions = array('masterFile' => $file, 'automaticSerialization' => true);
  5. $backendOptions = array('cacheDir' => $this->config->cache_dir);
  6. $cache = Zend_Cache::factory('File', 'File', $frontendOptions, $backendOptions);
  7.  
  8. if (!($xml = $cache->load($controller)))
  9. {
  10. $xml = simplexml_load_file($file);
  11. $cache->save($xml);
  12. }
  13. ?>


Xml jest serializowny do cache i cały czas php pluje błędami:
Warning: unserialize() [function.unserialize]: Node no longer exists in Zend\Cache\Core.php on line 222
Warning: unserialize() [function.unserialize]: Node no longer exists in Zend\Cache\Core.php on line 222
Warning: unserialize() [function.unserialize]: Node no longer exists in Zend\Cache\Core.php on line 222
Warning: unserialize() [function.unserialize]: Node no longer exists in Zend\Cache\Core.php on line 222
Warning: unserialize() [function.unserialize]: Node no longer exists in Zend\Cache\Core.php on line 222
Warning: unserialize() [function.unserialize]: Node no longer exists in Zend\Cache\Core.php on line 222
Warning: unserialize() [function.unserialize]: Node no longer exists in Zend\Cache\Core.php on line 222
Warning: unserialize() [function.unserialize]: Node no longer exists in Zend\Cache\Core.php on line 222

Pozdrawiam
menic
Z tego co wyczytałem, to nie mozna unserializowac obiektów simplexml. Sam sie mecze z tym i nie da rady ;/
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.