protected function generateUpdates() { $updates = array(); if ($this->flush) { $updates[] = array('flush', array($this->cache, 'flush'), array()); } foreach ($this->keys as $key => $data) { $updates[] = $data; } return $updates; }