Join Easy-Forex, THE site for forex trading. Best Website for hosting
Download Forex Joe's Free Book
You Know Free Practice Trading Account,Trading Forex A currency trade is the simultaneous buying of one currency and selling of another one. The currency combination used in the trade is called a cross (for example, the euro/US dollar, or the GB pound/Japanese yen.). The most commonly traded currencies are the so-called "majors" – EURUSD, USDJPY, USDCHF and GBPUSD.

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

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'));

  }

Related Posts by Categories



U want get it? click here | Yul Jet

Comments :

0 comments to “Cache Your Zend Framework Config to Improve Performance, zend cache configuration”

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

 

Blogger Torturial

Visitor From...

Followers

Copyright © 2009 by Blogger Torturial , Help Blogger , Fixs Blogger, Techlogy today

Join Easy-Forex, THE site for forex trading. Best Website for hosting
Download Forex Joe's Free Book
Template by Blog Templste 4 U | Blogspot Tutorial