Example #1
0
        static async Task Main()
        {
            var db = new SmsUserDb()
            {
                UserId = "user ID"
            };
            var cache = new Cache();

            cache.Add("key", db);
            Console.WriteLine("Press RETURN to await cache.GetHashedAsync()");
            Console.ReadLine();
            var result = await cache.GetHashedAsync("key");

            Console.WriteLine("Press RETURN to await Reminders[0].Value");
            Console.ReadLine();
            Console.WriteLine((await result.Reminders)[0].Value);
        }
Example #2
0
 public void Add(string key, SmsUserDb value)
 {
     _cache.Add(key, value);
 }