BB.Caching.Cache.Shared.Keys.TimeToLive C# (CSharp) Méthode

TimeToLive() public static méthode

Returns the remaining time to live of a key that has a timeout. This introspection capability allows a Redis client to check how many seconds a given key will continue to be part of the dataset.
http://redis.io/commands/ttl
public static TimeToLive ( string key ) : TimeSpan?
key string /// The key. ///
Résultat TimeSpan?
                public static TimeSpan? TimeToLive(string key)
                {
                    return SharedCache.Instance.GetReadConnection(key)
                        .GetDatabase(SharedCache.Instance.Db)
                        .KeyTimeToLive(key);
                }