https://groups.google.com/forum/?fromgroups=#!topic/phalcon/xn1_Ij8sD6Q
if have not never expries.
for example:
<?php
class TestController extends ... {
public function newAction () {}
public function editAction () {}
public function saveAction () {
//insert operate
$data = Tests::find();
$this->cache->save($key,$data);
}
public function updateAction () {
// update operate
$data = Tests::find();
$this->cache->save($key,$data);
}
public function listAction() {
$data = $this->cache->get($key); // if can set cache never expries.
// or can not set cache never expries, at ervery get cache's ,need write follow code
// not for Performance
if($data === null ) {
$data = Tests::find();
$this->cache->save($key,$data);
}
}
public function deleteAction () {}
}