Page Speed Optimization Libraries  1.11.33.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | List of all members
net_instaweb::ConditionalSharedAsyncFetch Class Reference

#include "async_fetch.h"

Inheritance diagram for net_instaweb::ConditionalSharedAsyncFetch:
net_instaweb::SharedAsyncFetch net_instaweb::AsyncFetch

Public Member Functions

 ConditionalSharedAsyncFetch (AsyncFetch *base_fetch, HTTPValue *cached_value, MessageHandler *handler)
 
void set_num_conditional_refreshes (Variable *x)
 
- Public Member Functions inherited from net_instaweb::SharedAsyncFetch
 SharedAsyncFetch (AsyncFetch *base_fetch)
 
virtual const RequestContextPtr & request_context ()
 
- Public Member Functions inherited from net_instaweb::AsyncFetch
 AsyncFetch (const RequestContextPtr &request_ctx)
 
void HeadersComplete ()
 
void Done (bool success)
 
virtual bool Write (const StringPiece &content, MessageHandler *handler)
 
virtual bool Flush (MessageHandler *handler)
 
RequestHeaders * request_headers ()
 
void set_request_headers (RequestHeaders *headers)
 
void SetRequestHeadersTakingOwnership (RequestHeaders *headers)
 Same as above, but takes ownership.
 
const RequestHeaders * request_headers () const
 
ResponseHeaders * response_headers ()
 See doc for request_headers and set_request_headers.
 
void set_response_headers (ResponseHeaders *headers)
 
ResponseHeaders * extra_response_headers ()
 
void set_extra_response_headers (ResponseHeaders *headers)
 
virtual void Reset ()
 
bool headers_complete () const
 
bool content_length_known () const
 
int64 content_length () const
 
void set_content_length (int64 x)
 
GoogleString LoggingString ()
 
virtual AbstractLogRecord * log_record ()
 

Protected Member Functions

virtual void HandleDone (bool success)
 
virtual bool HandleWrite (const StringPiece &content, MessageHandler *handler)
 
virtual bool HandleFlush (MessageHandler *handler)
 
virtual void HandleHeadersComplete ()
 
- Protected Member Functions inherited from net_instaweb::SharedAsyncFetch
virtual bool IsCachedResultValid (const ResponseHeaders &headers)
 
virtual bool IsBackgroundFetch () const
 
void PropagateContentLength ()
 Propagates any set_content_length from this to the base fetch.
 

Additional Inherited Members

- Static Public Attributes inherited from net_instaweb::AsyncFetch
static const int kContentLengthUnknown = -1
 

Detailed Description

Creates a SharedAsyncFetch object using an existing AsyncFetch and a cached value (that may be stale) that is used to conditionally check if the resource at the origin has changed. If the resource hasn't changed and we get a 304, we serve the cached response, thus avoiding the download of the entire content. Note that we if you want the conditionally validated resource to be treated as a newly fetched with the original ttl, you should use this fetch such that the fixing of date headers happens in the base fetch. Also, note that this class gets deleted when HandleDone is called.


The documentation for this class was generated from the following file: