#include "apache_resource_manager.h"
Public Member Functions | |
ApacheResourceManager (ApacheRewriteDriverFactory *factory, server_rec *server, const StringPiece &version) | |
GoogleString | hostname_identifier () |
void | SetStatistics (SharedMemStatistics *x) |
ApacheRewriteDriverFactory * | apache_factory () |
ApacheConfig * | config () |
bool | InitFileCachePath () |
void | ChildInit () |
Should be called after the child process is forked. | |
UrlPollableAsyncFetcher * | subresource_fetcher () |
bool | initialized () const |
bool | PoolDestroyed () |
void | PollFilesystemForCacheFlush () |
void | set_cache_flush_poll_interval_sec (int num_seconds) |
void | set_cache_flush_filename (const StringPiece &sp) |
const server_rec * | server () const |
Static Public Member Functions | |
static void | Initialize (Statistics *statistics) |
Creates an Apache-specific ResourceManager. This differs from base class that it incorporates by adding per-VirtualHost configuration, including:
void net_instaweb::ApacheResourceManager::PollFilesystemForCacheFlush | ( | ) |
Poll; if we haven't checked the timestamp of $FILE_PREFIX/cache.flush in the past cache_flush_poll_interval_sec_ (default 5) seconds do so, and if the timestamp has expired then update the cache_invalidation_timestamp in global_options, thus flushing the cache.
TODO(jmarantz): allow configuration of this option.
TODO(jmarantz): allow a URL-based mechanism to flush cache, even if we implement it by simply writing the cache.flush file so other servers can see it. Note that using shared-memory is not a great plan because we need the cache-invalidation to persist across server restart.
bool net_instaweb::ApacheResourceManager::PoolDestroyed | ( | ) |
Called on notification from Apache on child exit. Returns true if this is the last ResourceManager that exists.