만료 시간이 1 초인 couchbase 캐시에 값을 추가하지만 20 초 이상 만료되었습니다. membase의 캐시 만료 정책이란 무엇입니까? 당신은 당신이 1 초 이상 나중에 요청할 경우 Membase에서 그것을 얻을 수 없습니다 1 초 만료 뭔가를 설정하면Membase 캐시 만료 정책
여기, 내 코드
public string TestCache()
{
String spoon = null;
using (var client = new CouchbaseClient())
{
spoon=client.Get<string>("Spoon");
if(string.IsNullOrEmpty(spoon))
{
client.Store(StoreMode.Set,
"Spoon",
"Hello, Couchbase! Cache data is" + DateTime.Now.ToString(),
TimeSpan.FromSeconds(1));
}
spoon = client.Get<string>("Spoon");
}
return string.IsNullOrEmpty(spoon)
? "Can not get data from cache"
: "Data from cache: " + spoon;
}