/// <summary> /// Only sets cacheAsync if native Async provider, otherwise sets cacheSync /// </summary> /// <param name="req"></param> /// <returns></returns> public virtual void TryGetNativeCacheClient(IRequest req, out ICacheClient cacheSync, out ICacheClientAsync cacheAsync) { cacheSync = GetCacheClient(req); cacheAsync = (req ?? (IResolver)this).TryResolve <ICacheClientAsync>(); if (cacheAsync.Unwrap() != null) // non-null if wraps sync ICacheClient { cacheAsync = null; } else if (cacheAsync != null) { cacheSync = null; } }