非 Azure AppFabric (v1.1) からキャッシュ エントリを削除するコードを書いています。以下のコード スニペットでは、DataCache.Remove は常に false を返します...
object bogusData = new object();
_cache.Put(account, bogusData, TimeSpan.FromSeconds(10.0));
Sleep(1000); // for testing purposes
// we don't need the contents of the cache entry, we just want to know
// if the account is in the cache or not...
object cachedData = _cache.Get(account);
// if we don't find it in the cache, it is already been removed (or expired), so return true.
if (cachedData == null)
return true;
Sleep(1000); // for testing purposes
// this always returns false
bool status = _cache.Remove(account);
設計上、上記のコード スニペットでは、cachedData は常に != null です。
何か案は?