MediaWiki  master
PopularityRefreshingWANObjectCache Class Reference
Inheritance diagram for PopularityRefreshingWANObjectCache:
Collaboration diagram for PopularityRefreshingWANObjectCache:

Protected Member Functions

 worthRefreshPopular ( $asOf, $ageNew, $timeTillRefresh, $now)
 
- Protected Member Functions inherited from WANObjectCache
 getCurrentTime ()
 
 isValid ( $value, $asOf, $minAsOf, $purgeTime=null)
 Check if $value is not false, versioned (if needed), and not older than $minTime (if set) More...
 
 relayDelete ( $key)
 Do the actual async bus delete of a key. More...
 
 relayPurge ( $key, $ttl, $holdoff)
 Do the actual async bus purge of a key. More...
 
 worthRefreshExpiring ( $curTTL, $lowTTL)
 Check if a key is nearing expiration and thus due for randomized regeneration. More...
 
 worthRefreshPopular ( $asOf, $ageNew, $timeTillRefresh, $now)
 Check if a key is due for randomized regeneration due to its popularity. More...
 

Additional Inherited Members

- Public Member Functions inherited from WANObjectCache
 __construct (array $params)
 
 adaptiveTTL ( $mtime, $maxTTL, $minTTL=30, $factor=0.2)
 Get a TTL that is higher for objects that have not changed recently. More...
 
 clearLastError ()
 Clear the "last error" registry. More...
 
 clearProcessCache ()
 Clear the in-process caches; useful for testing. More...
 
 delete ( $key, $ttl=self::HOLDOFF_TTL)
 Purge a key from all datacenters. More...
 
 get ( $key, &$curTTL=null, array $checkKeys=[], &$info=null)
 Fetch the value of a key from cache. More...
 
 getCheckKeyTime ( $key)
 Fetch the value of a timestamp "check" key. More...
 
 getLastError ()
 Get the "last error" registered; clearLastError() should be called manually. More...
 
 getMulti (array $keys, &$curTTLs=[], array $checkKeys=[], &$info=null)
 Fetch the value of several keys from cache. More...
 
 getMultiCheckKeyTime (array $keys)
 Fetch the values of each timestamp "check" key. More...
 
 getMultiWithSetCallback (ArrayIterator $keyedIds, $ttl, callable $callback, array $opts=[])
 Method to fetch multiple cache keys at once with regeneration. More...
 
 getMultiWithUnionSetCallback (ArrayIterator $keyedIds, $ttl, callable $callback, array $opts=[])
 Method to fetch/regenerate multiple cache keys at once. More...
 
 getQoS ( $flag)
 
 getWarmupKeyMisses ()
 
 getWithSetCallback ( $key, $ttl, $callback, array $opts=[])
 Method to fetch/regenerate cache keys. More...
 
 hash256 ( $component)
 Hash a possibly long string into a suitable component for makeKey()/makeGlobalKey() More...
 
 makeGlobalKey ( $class,... $components)
 
 makeKey ( $class,... $components)
 
 makeMultiKeys (array $ids, $keyCallback)
 Get an iterator of (cache key => entity ID) for a list of entity IDs. More...
 
 multiRemap (array $ids, array $res)
 Get an (ID => value) map from (i) a non-unique list of entity IDs, and (ii) the list of corresponding entity values by first appearance of each ID in the entity ID list. More...
 
 reap ( $key, $purgeTimestamp, &$isStale=false)
 Set a key to soon expire in the local cluster if it pre-dates $purgeTimestamp. More...
 
 reapCheckKey ( $key, $purgeTimestamp, &$isStale=false)
 Set a "check" key to soon expire in the local cluster if it pre-dates $purgeTimestamp. More...
 
 resetCheckKey ( $key)
 Delete a "check" key from all datacenters, invalidating keys that use it. More...
 
 set ( $key, $value, $ttl=self::TTL_INDEFINITE, array $opts=[])
 Set the value of a key in cache. More...
 
 setLogger (LoggerInterface $logger)
 
 setMockTime (&$time)
 
 touchCheckKey ( $key, $holdoff=self::HOLDOFF_TTL)
 Purge a "check" key from all datacenters, invalidating keys that use it. More...
 
 useInterimHoldOffCaching ( $enabled)
 Enable or disable the use of brief caching for tombstoned keys. More...
 
- Static Public Member Functions inherited from WANObjectCache
static newEmpty ()
 Get an instance that wraps EmptyBagOStuff. More...
 
- Public Attributes inherited from IExpiringStore
const ATTR_EMULATION = 1
 
const ATTR_SYNCWRITES = 2
 
const ERR_NO_RESPONSE = 1
 
const ERR_NONE = 0
 
const ERR_UNEXPECTED = 3
 
const ERR_UNREACHABLE = 2
 
const QOS_EMULATION_SQL = 1
 
const QOS_SYNCWRITES_BE = 2
 
const QOS_SYNCWRITES_NONE = 1
 
const QOS_SYNCWRITES_QC = 3
 
const QOS_SYNCWRITES_SS = 4
 
const QOS_UNKNOWN = INF
 
const TTL_DAY = 86400
 
const TTL_HOUR = 3600
 
const TTL_INDEFINITE = 0
 
const TTL_MINUTE = 60
 
const TTL_MONTH = 2592000
 
const TTL_PROC_LONG = 30
 
const TTL_PROC_SHORT = 3
 
const TTL_SECOND = 1
 
const TTL_WEEK = 604800
 
const TTL_YEAR = 31536000
 
- Static Protected Member Functions inherited from WANObjectCache
static prefixCacheKeys (array $keys, $prefix)
 
- Protected Attributes inherited from WANObjectCache
callable null $asyncHandler
 Function that takes a WAN cache callback and runs it later. More...
 
BagOStuff $cache
 The local datacenter cache. More...
 
string $cluster
 Cache cluster name for mcrouter use. More...
 
float $epoch
 Unix timestamp of the oldest possible valid values. More...
 
LoggerInterface $logger
 
 $mcrouterAware
 bool Whether to use mcrouter key prefixing for routing More...
 
MapCacheLRU [] $processCaches = []
 Map of group PHP instance caches. More...
 
string $region
 Physical region for mcrouter use. More...
 
string $secret
 Stable secret used for hasing long strings into key components. More...
 
StatsdDataFactoryInterface $stats
 
bool $useInterimHoldOffCaching = true
 Whether to use "interim" caching while keys are tombstoned. More...
 

Detailed Description

Definition at line 2111 of file WANObjectCacheTest.php.

Member Function Documentation

◆ worthRefreshPopular()

PopularityRefreshingWANObjectCache::worthRefreshPopular (   $asOf,
  $ageNew,
  $timeTillRefresh,
  $now 
)
protected

Definition at line 2112 of file WANObjectCacheTest.php.


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