Ejemplo n.º 1
0
 public bool CanFullyCache(HttpJsonRequestFactory jsonRequestFactory, HttpJsonRequest httpJsonRequest, string postedData)
 {
     if (allRequestsCanBeServedFromAggressiveCache) // can be fully served from aggressive cache
     {
         if (jsonRequestFactory.CanLogRequest)
         {
             jsonRequestFactory.OnLogRequest(holdProfilingInformation, new RequestResultArgs
             {
                 DurationMilliseconds = httpJsonRequest.CalculateDuration(),
                 Method     = httpJsonRequest.Method,
                 HttpResult = 0,
                 Status     = RequestStatus.AggressivelyCached,
                 Result     = "",
                 Url        = httpJsonRequest.Url.ToString(),
                 //TODO: check that is the same as: Url = httpJsonRequest.webRequest.RequestUri.PathAndQuery,
                 PostedData = postedData
             });
         }
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
        public bool CanFullyCache(HttpJsonRequestFactory jsonRequestFactory, HttpJsonRequest httpJsonRequest, string postedData)
        {
            if (allRequestsCanBeServedFromAggressiveCache) // can be fully served from aggressive cache
            {
                if (jsonRequestFactory.CanLogRequest)
                {

                    jsonRequestFactory.OnLogRequest(holdProfilingInformation, new RequestResultArgs
                    {
                        DurationMilliseconds = httpJsonRequest.CalculateDuration(),
                        Method = httpJsonRequest.Method,
                        HttpResult = 0,
                        Status = RequestStatus.AggressivelyCached,
                        Result = "",
                        Url = httpJsonRequest.Url.ToString(),
                        //TODO: check that is the same as: Url = httpJsonRequest.webRequest.RequestUri.PathAndQuery,
                        PostedData = postedData
                    });
                }
                return true;
            }
            return false;
        }