Cache Your Zend Framework Config to Improve Performance, zend cache configuration

undefined

Caching in Zend Framework is operated by frontends while cache records are stored through backend adapters (File, Sqlite, Memcache...) through a flexible system of IDs and tags. Using those, it is easy to delete specific types of records afterwards (for example: "delete all cache records marked with a given tag").

How to zend cache configuration:
Copy this to Bootstrap.php
protected function _initMyRoutes() {

  // Disable auto buffer and instead leave it to the cache


Zend_Controller_Front::getInstance()->setParam('disableOutputBuffering', true);

  $frontendOptionsCore = array(

  'automatic_serialization' => true,

  'lifetime' => 600

  );


$frontendOptionsPage = array(

  'automatic_serialization' => true,

  'lifetime' => 600,

  'default_options' => array(

  'cache_with_get_variables' => true,

  'cache_with_session_variables' => true,

  'cache_with_cookie_variables' => true,

  'make_id_with_get_variables' => true,

  'make_id_with_session_variables' => true,

  'make_id_with_cookie_variables' => false

  )

  );


$backendOptions = array('cache_dir' => APPLICATION_PATH . '/Cache');

  $coreCache = Zend_Cache::factory('Core', 'File', $frontendOptionsCore, $backendOptions);

  $pageCache = Zend_Cache::factory('Page', 'File', $frontendOptionsPage, $backendOptions);


// Start running the page cache immediately

  $pageCache->start();


// Set global cache objects

  Zend_Registry::set('coreCache', $coreCache);

  Zend_Registry::set('pageCache', $pageCache);


// Start running the DB/Core cache

  Zend_Db_Table_Abstract::setDefaultMetadataCache(Zend_Registry::get('coreCache'));

  }
Save Url in CSV using IMACROS, iMacro JavaScript Extracting values ការប្រើ iMacro ដើម្បីបង្កើត csv file and adding new line - (0 comments)
DRAG AND DROP NESTABLE MENU ON PHP AND MYSQL AND JQUERY - (4 comments)
How to create Menu and Sub menu, How to use Recursion Function in Codeigniter recursive function, Php, MySQL - (0 comments)

0 comments:

Post a Comment

Followers

រឿង ដែលខានមើលមិនបាន

Contact us

Name

Email *

Message *

Your Language

Online

Copyright 2009 Simplex Celebs All rights reserved Designed by www.sruol9.com