1

I have this code to start Zend Cache , and I set the try cache exception to cancel Zend Cache if an error accorded during the process, but it does not work and does not print the error inside catch Exception.

$frontendOptions = array(
          'lifetime' => $cacheTime,
          'content_type_memorization' => false,
          'default_options' => array(
              'cache' => true,
              'make_id_with_cookie_variables' => false,
              'make_id_with_session_variables' => false,
              'cache_with_get_variables' => true,
              'cache_with_post_variables' => true,
              'cache_with_session_variables' => true,
              'cache_with_files_variables' => true,
              'cache_with_cookie_variables' => true,
              'tags' => $cacheTag,
          ),
          'regexps' => array(
              '$' => array('cache' => true),
          )
      );

      $backendOptions = array('cache_dir' => '/var');
      $cache = Zend_Cache::factory('Page', 'File', $frontendOptions, $backendOptions);
      try {
          $cache->start();
      } catch (Exception $exc) {
          echo $exc->getMessage();
      }

and I tried the $cache->cancel() without any result.

Thanks

Osama Jetawe
  • 2,697
  • 6
  • 24
  • 40

0 Answers0