public function save(TalkEntity $talk) { $data = array('uri' => $talk->getApiUri(), 'title' => $talk->getTitle(), 'slug' => $talk->getUrlFriendlyTalkTitle(), 'verbose_uri' => $talk->getApiUri(true), 'event_uri' => $talk->getEventUri(), 'stub' => $talk->getStub()); $savedTalk = $this->load('uri', $talk->getApiUri()); if ($savedTalk) { // talk is already known - update this record $data = array_merge($savedTalk, $data); } $keys = array('event_uri' => $talk->getEventUri(), 'slug' => $talk->getUrlFriendlyTalkTitle()); $this->cache->saveByKeys($this->keyName, $data, $keys); $this->cache->save($this->keyName, $data, 'uri', $talk->getApiUri()); $this->cache->save($this->keyName, $data, 'stub', $talk->getStub()); }