You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
598 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CacheInterface
{
public interface ICacheService
{
Task Set<T>(string key, T value, int ttl = -1);
Task BatchSet<T>(Dictionary<string, T> values, int ttl = -1);
Task<T> Get<T>(string key);
Task<Dictionary<string, T>> BatchGet<T>(IEnumerable<string> keys);
Task Delete(string key);
Task BatchDelete(params string[] keys);
Task<Dictionary<string, T>> Query<T>(string query, int count = 9999);
}
}