5
アイテムのプログラムでSitecoreキャッシュをクリアしたい。私は以下のコードを実行した。その後、削除されたIDでweb.GetItemを実行しようとしましたが、まだnullが返されます。助言がありますか?プログラムからキャッシュからアイテムのSitecoreキャッシュを消去する
Database db = new Database("web");
if (ID.IsID(id))
{
ID itemID = new ID(id);
//clear data cache
db.Caches.DataCache.RemoveItemInformation(itemID);
//clear item cache
db.Caches.ItemCache.RemoveItem(itemID);
//clear standard values cache
db.Caches.StandardValuesCache.RemoveKeysContaining(itemID.ToString());
//remove path cache
db.Caches.PathCache.RemoveKeysContaining(itemID.ToString());
}