public void StatisticTest()
		{
			var cacheManager = new CacheManager(new InMemoryCachingProvider(), null);
			var statisticJob = new CollectOrderStatisticJob(GetOrderRepositoryFactory(), cacheManager);
			statisticJob.CollectStatistics(DateTime.UtcNow.AddYears(-1), DateTime.UtcNow);
		}
		public IHttpActionResult GetDashboardStatistics([FromUri]DateTime? start = null, [FromUri]DateTime? end = null)
		{
			start = start ?? DateTime.UtcNow.AddYears(-1);
			end = end ?? DateTime.UtcNow;
			var cacheKey = CacheKey.Create("Statistic", start.Value.ToString("yyyy-MM-dd"), end.Value.ToString("yyyy-MM-dd"));
			var retVal = _cacheManager.Get(cacheKey, () =>
			{

				var collectStaticJob = new CollectOrderStatisticJob(_repositoryFactory, _cacheManager);
				return collectStaticJob.CollectStatistics(start.Value, end.Value);

			});
			return Ok(retVal);
		}
		public IHttpActionResult GetDashboardStatistics([FromUri]DateTime? start = null, [FromUri]DateTime? end = null)
		{
            webModel.DashboardStatisticsResult retVal = null;
            start = start ?? DateTime.UtcNow.AddYears(-1);
			end = end ?? DateTime.UtcNow;

            // Hack: to compinsate for incorrect Local dates to UTC
            end = end.Value.AddDays(2);
			var cacheKey = CacheKey.Create("Statistic", start.Value.ToString("yyyy-MM-dd"), end.Value.ToString("yyyy-MM-dd"));
            lock(_lockObject)
            {
                retVal = _cacheManager.Get(cacheKey, () =>
                {

                    var collectStaticJob = new CollectOrderStatisticJob(_repositoryFactory, _cacheManager);
                    return collectStaticJob.CollectStatistics(start.Value, end.Value);

                });
            }
            return Ok(retVal);
        }