protected function mem($key, $itemFetchedFromDB) { $mem_obj = new MyMemcached(); if ($mem_obj->doFetch($key)) { $item = $mem_obj->doFetch($key); } else { $item = $itemFetchedFromDB; $mem_obj->doSave($key, $itemFetchedFromDB, 0); } return $item; }
protected function deleteMem($key) { $mem = new MyMemcached($key); $mem->doDelete($key); }