Page Speed Optimization Libraries
1.7.30.1
|
A server context with features specific to a PSOL port on a unix system. More...
#include "system_server_context.h"
Public Member Functions | |
SystemServerContext (RewriteDriverFactory *factory, StringPiece hostname, int port) | |
void | FlushCacheIfNecessary () |
SystemRewriteOptions * | system_rewrite_options () |
GoogleString | hostname_identifier () |
virtual void | ChildInit (SystemRewriteDriverFactory *factory) |
Called by SystemRewriteDriverFactory::ChildInit. See documentation there. | |
void | CreateLocalStatistics (Statistics *global_statistics, SystemRewriteDriverFactory *factory) |
bool | initialized () const |
virtual void | ApplySessionFetchers (const RequestContextPtr &req, RewriteDriver *driver) |
void | AddHtmlRewriteTimeUs (int64 rewrite_time_us) |
virtual void | CollapseConfigOverlaysAndComputeSignatures () |
Static Public Member Functions | |
static void | InitStats (Statistics *statistics) |
Protected Member Functions | |
virtual bool | UpdateCacheFlushTimestampMs (int64 timestamp_ms) |
virtual void | MaybeApplySpdySessionFetcher (const RequestContextPtr &request, RewriteDriver *driver) |
Hook for implementations to support fetching directly from the spdy module. | |
Variable * | statistics_404_count () |
A server context with features specific to a PSOL port on a unix system.
void net_instaweb::SystemServerContext::AddHtmlRewriteTimeUs | ( | int64 | rewrite_time_us | ) |
Accumulate in a histogram the amount of time spent rewriting HTML.
virtual void net_instaweb::SystemServerContext::ApplySessionFetchers | ( | const RequestContextPtr & | req, |
RewriteDriver * | driver | ||
) | [virtual] |
Normally we just fetch with the default UrlAsyncFetcher, generally serf, but there are some cases where we need to do something more complex:
Reimplemented from net_instaweb::ServerContext.
virtual void net_instaweb::SystemServerContext::CollapseConfigOverlaysAndComputeSignatures | ( | ) | [virtual] |
Hook called after all configuration parsing is done to support implementers like ApacheServerContext that need to collapse configuration inside the config overlays into actual RewriteOptions objects. It will also compute signatures when done, and by default that's the only thing it does.
Reimplemented in net_instaweb::ApacheServerContext.
void net_instaweb::SystemServerContext::CreateLocalStatistics | ( | Statistics * | global_statistics, |
SystemRewriteDriverFactory * | factory | ||
) |
Initialize this ServerContext to have its own statistics domain. Must be called after global_statistics has been created and had ::InitStats called on it.
Implementations should call this method on every request, both for html and resources, to avoid serving stale resources.
bool net_instaweb::SystemServerContext::initialized | ( | ) | const [inline] |
Whether ChildInit() has been called yet. Exposed so debugging code can verify initialization proceeded properly.
virtual bool net_instaweb::SystemServerContext::UpdateCacheFlushTimestampMs | ( | int64 | timestamp_ms | ) | [protected, virtual] |
Flush the cache by updating the cache flush timestamp in the global options. This will change its signature, which is part of the cache key, and so all previously cached entries will be unreachable.
Returns true if it actually updated the timestamp, false if the existing cache flush timestamp was newer or the same as the one provided.
Subclasses which add aditional configurations need to override this method to additionally update the cache flush timestamp in those other configurations. See ApacheServerContext::UpdateCacheFlushTimestampMs where the separate SpdyConfig that mod_pagespeed uses when using SPDY also needs to have it's timestamp bumped.