2

I am working on a project developed in zend framework. The developer who worked already has used zend metadata cache and using zend function info() to get metadata of the table.

Now I have inserted a new field status in the table. Now the table is not returning the new field.

The code for creating cache is as follow

$frontendOptions = array(
        'automatic_serialization' => true,
        'lifetime' => 100000,
        'cache_id_prefix' => 'metaData_',
    );
    $backendOptions = array();
    $cache = Zend_Cache::factory(
        'Core', 
        'File',
        $frontendOptions,
        $backendOptions
    );
    Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);

I tried to delete the cache by using

$cache = Zend_Cache::factory();
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
$cache->clean(Zend_Cache::CLEANING_MODE_ALL); 

Can somebody tell me how to deal with this problem?

Florent
  • 12,310
  • 10
  • 49
  • 58
Awais Qarni
  • 17,492
  • 24
  • 75
  • 137
  • @Gordon what is the expected file location? – Awais Qarni Oct 26 '12 at 15:52
  • What you configured it to be. And if you didnt configure it's the default given in the Reference Guide: http://framework.zend.com/manual/1.12/en/zend.cache.backends.html – Gordon Oct 26 '12 at 15:54
  • In your second code snippet you don't setup the factory with any options. Is this how you do it? Then the clean method is not aware of `file` backend. – Adrian World Oct 26 '12 at 18:09
  • since you haven't specified the cache directory (cache_dir) in the `$backendOptions` the directory will be taken as the default directory, which is the temp directory of the server. [Zend_Cache_Backend_Options] (http://framework.zend.com/manual/1.12/en/zend.cache.backends.html) – Nandakumar V Oct 27 '12 at 17:42

0 Answers0