MediaWiki
1.33.0
|
ResourceLoader request result caching in the file system. More...
Public Member Functions | |
isCacheWorthy () | |
Item has many recent cache misses. More... | |
Public Member Functions inherited from FileCacheBase | |
cacheTimestamp () | |
Get the last-modified timestamp of the cache file. More... | |
clearCache () | |
Clear the cache for this page. More... | |
fetchText () | |
Get the uncompressed text from the cache. More... | |
getMissesRecent () | |
Roughly gets the cache misses in the last hour by unique visitors. More... | |
incrMissesRecent (WebRequest $request) | |
Roughly increments the cache misses in the last hour by unique visitors. More... | |
isCached () | |
Check if the cache file exists. More... | |
isCacheGood ( $timestamp='') | |
Check if up to date cache file exists. More... | |
saveText ( $text) | |
Save and compress text to the cache. More... | |
Static Public Member Functions | |
static | newFromContext (ResourceLoaderContext $context) |
Construct an ResourceFileCache from a context. More... | |
static | useFileCache (ResourceLoaderContext $context) |
Check if an RL request can be cached. More... | |
Public Attributes | |
const | MISS_THRESHOLD = 360 |
Public Attributes inherited from FileCacheBase | |
const | MISS_FACTOR = 15 |
const | MISS_TTL_SEC = 3600 |
Protected Member Functions | |
cacheDirectory () | |
Get the base file cache directory. More... | |
Protected Member Functions inherited from FileCacheBase | |
__construct () | |
baseCacheDirectory () | |
Get the base file cache directory. More... | |
cacheMissKey (BagOStuff $cache) | |
cachePath () | |
Get the path to the cache file. More... | |
checkCacheDirs () | |
Create parent directors of $this->cachePath() More... | |
hashSubdirectory () | |
Return relative multi-level hash subdirectory (with trailing slash) or the empty string if not $wgFileCacheDepth. More... | |
typeSubdirectory () | |
Get the cache type subdirectory (with trailing slash) An extending class could use that method to alter the type -> directory mapping. More... | |
useGzip () | |
Check if the cache is gzipped. More... | |
Protected Attributes | |
$mCacheWorthy | |
Protected Attributes inherited from FileCacheBase | |
$mCached | |
$mExt = 'cache' | |
$mFilePath | |
$mKey | |
$mType = 'object' | |
$mUseGzip | |
ResourceLoader request result caching in the file system.
Definition at line 29 of file ResourceFileCache.php.
|
protected |
Get the base file cache directory.
Reimplemented from FileCacheBase.
Definition at line 99 of file ResourceFileCache.php.
References FileCacheBase\baseCacheDirectory().
ResourceFileCache::isCacheWorthy | ( | ) |
Item has many recent cache misses.
Definition at line 107 of file ResourceFileCache.php.
References $mCacheWorthy, FileCacheBase\getMissesRecent(), and FileCacheBase\isCached().
|
static |
Construct an ResourceFileCache from a context.
ResourceLoaderContext | $context |
Definition at line 40 of file ResourceFileCache.php.
References $cache, $context, $modules, and captcha-old\count.
|
static |
Check if an RL request can be cached.
Caller is responsible for checking if any modules are private.
ResourceLoaderContext | $context |
Definition at line 66 of file ResourceFileCache.php.
References $context, $query, $wgDefaultSkin, $wgLanguageCode, $wgUseFileCache, and as.
|
protected |
Definition at line 30 of file ResourceFileCache.php.
Referenced by isCacheWorthy().
const ResourceFileCache::MISS_THRESHOLD = 360 |
Definition at line 33 of file ResourceFileCache.php.