コード例 #1
0
        public TimestampedCacheValue Get(string key)
        {
            var value = _cache.Get(key);

            return(value == null ? null : TimestampedCacheValue.FromString(value));
        }
コード例 #2
0
        public DateTime?GetCreationTimestamp(string key)
        {
            var value = _cache.GetStringStart(key, TimestampedCacheValue.MaxDateLength);

            return(value == null ? (DateTime?)null : TimestampedCacheValue.FromString(value).CreateCommenced);
        }
コード例 #3
0
 public void Set(string key, TimestampedCacheValue val, TimeSpan absoluteExpiration)
 {
     _cache.Set(key, val.ToString(), absoluteExpiration);
 }