Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
net_instaweb::SystemCachePath Class Reference

#include "system_cache_path.h"

Public Member Functions

 SystemCachePath (const StringPiece &path, const SystemRewriteOptions *config, RewriteDriverFactory *factory, AbstractSharedMem *shm_runtime)
 
CacheInterfacelru_cache ()
 Per-process in-memory LRU, with any stats/thread safety wrappers, or NULL.
 
CacheInterfacefile_cache ()
 Per-machine file cache with any stats wrappers.
 
FileCachefile_cache_backend ()
 
NamedLockManagerlock_manager ()
 
void RootInit ()
 See comments in SystemCaches for calling conventions on these.
 
void ChildInit (SlowWorker *cache_clean_worker)
 
void GlobalCleanup (MessageHandler *handler)
 only called in root process
 
void MergeConfig (const SystemRewriteOptions *config)
 
void AddServerContext (SystemServerContext *server_context)
 
void RemoveServerContext (SystemServerContext *server_context)
 Disassociates a server context with this CachePath – used on shutdown.
 
void FlushCacheIfNecessary ()
 
PurgeContextpurge_context ()
 

Static Public Member Functions

static GoogleString CachePath (SystemRewriteOptions *config)
 

Static Public Attributes

static const char kFileCache []
 CacheStats prefixes.
 
static const char kLruCache []
 

Detailed Description

The SystemCachePath encapsulates a cache-sharing model where a user specifies a file-cache path per virtual-host. With each file-cache object we keep a locking mechanism and an optional per-process LRUCache.

Member Function Documentation

void net_instaweb::SystemCachePath::AddServerContext ( SystemServerContext server_context)

Associates a ServerContext with this CachePath, enabling cache purges to propagate into the ServerContext's global options.

static GoogleString net_instaweb::SystemCachePath::CachePath ( SystemRewriteOptions config)
static

Computes a key suitable for building a map to help share common cache objects between vhosts. This key is given to the constructor as 'path'.

FileCache* net_instaweb::SystemCachePath::file_cache_backend ( )
inline

Access to backend for testing. Do not use this directly in production as it lacks statistics wrappers, etc.

void net_instaweb::SystemCachePath::FlushCacheIfNecessary ( )

Entry-point for flushing the cache, either via the legacy method of "touch .../cache.flush" or the newer method of purging via /pagespeed_admin/cache?purge=... or a PURGE method, depending on whether the EnableCachePurge method is set.

void net_instaweb::SystemCachePath::MergeConfig ( const SystemRewriteOptions config)

When there are multiple configurations which specify the same cache path, we must merge the other settings: the cleaning interval, size, and inode count.


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