private SystemCaching.CacheItemPolicy GetCacheDependency(object tag, CacheItemPolicy itemPolicy, ServiceCacheByDispatcher dispatch)
        {
            // item priority
            SystemCaching.CacheItemPriority itemPriority;
            switch (itemPolicy.Priority)
            {
            case CacheItemPriority.NotRemovable:
                itemPriority = SystemCaching.CacheItemPriority.NotRemovable;
                break;

            default:
                itemPriority = SystemCaching.CacheItemPriority.Default;
                break;
            }
            var removedCallback = (itemPolicy.RemovedCallback != null ? new SystemCaching.CacheEntryRemovedCallback(x => { itemPolicy.RemovedCallback(x.CacheItem.Key, x.CacheItem.Value); }) : null);
            var updateCallback  = (itemPolicy.UpdateCallback != null ? new SystemCaching.CacheEntryUpdateCallback(x => { itemPolicy.UpdateCallback(x.UpdatedCacheItem.Key, x.UpdatedCacheItem.Value); }) : null);
            var newItemPolicy   = new SystemCaching.CacheItemPolicy
            {
                AbsoluteExpiration = itemPolicy.AbsoluteExpiration,
                Priority           = itemPriority,
                RemovedCallback    = removedCallback,
                SlidingExpiration  = itemPolicy.SlidingExpiration,
                UpdateCallback     = updateCallback,
            };
            var changeMonitors = GetCacheDependency(tag, itemPolicy.Dependency, dispatch);

            if (changeMonitors != null)
            {
                var list = newItemPolicy.ChangeMonitors;
                foreach (var changeMonitor in changeMonitors)
                {
                    list.Add(changeMonitor);
                }
            }
            return(newItemPolicy);
        }