2012年6月4日月曜日

simplexml_load_stringで取得したXMLオブジェクトはCache_Liteでキャッシュできない

simplexml_load_string()で取得したXMLオブジェクトは、Cache_Liteでキャッシュできない。 変換する前の文字列の状態でキャッシュする。
if ($response = $this->cache->get($cid)) {
    $response = file_get_contents($request);
    $this->cache->set($cid, $response);
}
$xml = simplexml_load_string($response);

0 件のコメント:

コメントを投稿