private void GetDataByCacheKey(IInvocation invocation, IRedisCacheService redisCacheService, ParameterInfo[] parameters, string cacheKey) { invocation.ReturnValue = redisCacheService.GetNullableData(cacheKey, invocation.Method.ReturnType); for (int i = 0; i < parameters.Length; i++) { if (parameters[i].ParameterType.IsByRef) { object argVal = redisCacheService.GetData(cacheKey + parameters[i].Name, parameters[i].ParameterType.GetElementType()); invocation.SetArgumentValue(i, argVal); } } }