Yii Active Record的Query Cache

  Yii Active Record的Query Cache

 

  
  
  
  
  1. $cache_ttl = 60; 
  2. $cache_dependency = new CDbCacheDependency('SELECT MAX(update_time) FROM {{post}}'); 
  3.  
  4. model()->cache($cache_ttl$cache_dependency, 2)->findAll  

你可能感兴趣的:(职场,yii,休闲)