Ejemplo n.º 1
0
        public static bool Remove(this CachePartition partition, string key)
        {
            var stringKey = new PartitionObjectKeyString(partition.PartitionKey, key);

            return(partition.Remove(stringKey));
        }
Ejemplo n.º 2
0
        public static bool TryGetValue <TValue>(this CachePartition partition, string key, out TValue?value)
        {
            var stringKey = new PartitionObjectKeyString(partition.PartitionKey, key);

            return(partition.TryGetValue(stringKey, out value));
        }
Ejemplo n.º 3
0
        public static bool CreateEntry <TValue>(this CachePartition partition, string key, TValue?value, CancellationTokenSource tokenSourceBeforeComputingValue, double slidingCacheInMinutes, long?size = null, Action <ICacheEntry>?configureEntry = null)
        {
            var stringKey = new PartitionObjectKeyString(partition.PartitionKey, key);

            return(partition.CreateEntry(stringKey, value, tokenSourceBeforeComputingValue, slidingCacheInMinutes, size, configureEntry));
        }