title: Passing Object to DistributedCache set method?
body: <p>I am using this package <code>Microsoft.Extensions.Caching.Redis</code>.
  What is the way to pass <code>tModel</code> to set and get from cache.</p>
  
  <pre><code>public class TestModel
  {
      public int test1 { get; set; }
  
      public string test2 { get; set; }
  }
  
  var tModel = new TestModel();
  tModel.test1 = 1;
  tModel.test2 = "abc";
  
  _distributedCache.Set("model", tModel);
  </code></pre>