public function save($cacheUrl, Kwf_Component_Data $data) { $this->_redis->sAdd('urlids:pageid:' . $data->getPage()->componentId, 'url:' . $cacheUrl); $this->_redis->sAdd('urlids:expandedid:' . $data->getExpandedComponentId(), 'url:' . $cacheUrl); $parts = preg_split('/([_\\-])/', $data->getExpandedComponentId(), -1, PREG_SPLIT_DELIM_CAPTURE); $id = ''; foreach ($parts as $part) { $id .= $part; if ($part != '-' && $part != '_' && $id != 'root') { $this->_redis->sAdd('urlids:recexpandedid:' . $id, 'url:' . $cacheUrl); } } $this->_redis->setEx('url:' . $cacheUrl, 365 * 24 * 60 * 60, serialize($data->kwfSerialize())); }