title: Async/Await and Caching
body: <p>My service layer is caching alot of Db requests to memcached, does this make it impossible to use Async/Await?? For example how could I await this?</p>
  
  <pre><code>public virtual Store GetStoreByUsername(string username)
  {
          return _cacheManager.Get(string.Format("Cache_Key_{0}", username), () =&gt;
          {
                  return _storeRepository.GetSingle(x =&gt; x.UserName == username);
          });
  }
  </code></pre>
  
  <p>Note: If the key exists in the cache it will return a "Store" (not a <code>Task&lt;Store&gt;</code>), if the key does not exist in the cache it will execute the lambda. If I change the Func to </p>
  
  <pre><code>return await _storeRepository.GetSingleAsync(x =&gt; x.UserName == username);
  </code></pre>
  
  <p>And the method signature to </p>
  
  <pre><code>public virtual async Task&lt;Store&gt; GetStoreByUsername(string username)
  </code></pre>
  
  <p>This will not work obviously because of the cache return type.</p>