How can i do the followin tasks
public function addToCache($id,$items)
{
// in zend cache
}
public function getFromCache($id)
{
// in zend cache
}
The first method should take an id and items which should be cached.
The second method should just take an id of an cached object, and should return the content of the cache of that item id.
i want to be able to do something like that;
public function getItems()
{
if(!$this->cache->getFromCache('items'))
{
$this->addToCache('items',$this->feeds->items());
return $this->cache->getFromCache('items');
}
}
How can i do the both methods in zend cache ?