MediaWiki master
|
Provides a caching layer for a CacheableSource
.
More...
Inherits Stringable, MediaWiki\Settings\Source\SettingsSource, and MediaWiki\Settings\Source\SettingsIncludeLocator.
Public Member Functions | |
__construct (BagOStuff $cache, CacheableSource $source) | |
Constructs a new CachedSource using an instantiated cache and CacheableSource . | |
__toString () | |
Returns the string representation of the encapsulated source. | |
load () | |
Queries cache for source contents and performs loading/caching of the source contents on miss. | |
locateInclude (string $location) | |
This method defines how a relative reference to the location of another settings source is interpreted. | |
Provides a caching layer for a CacheableSource
.
Definition at line 18 of file CachedSource.php.
MediaWiki\Settings\Cache\CachedSource::__construct | ( | BagOStuff | $cache, |
CacheableSource | $source ) |
Constructs a new CachedSource using an instantiated cache and CacheableSource
.
BagOStuff | $cache | |
CacheableSource | $source |
Definition at line 39 of file CachedSource.php.
References $source.
MediaWiki\Settings\Cache\CachedSource::__toString | ( | ) |
Returns the string representation of the encapsulated source.
Definition at line 122 of file CachedSource.php.
MediaWiki\Settings\Cache\CachedSource::load | ( | ) |
Queries cache for source contents and performs loading/caching of the source contents on miss.
If the load fails but the source implements CacheableSource::allowsStaleLoad()
as true
, stale results may be returned if still present in the cache store.
Implements MediaWiki\Settings\Source\SettingsSource.
Definition at line 57 of file CachedSource.php.
MediaWiki\Settings\Cache\CachedSource::locateInclude | ( | string | $location | ) |
This method defines how a relative reference to the location of another settings source is interpreted.
It tries to make $location absolute by interpreting it as relative to the location of the SettingsSource it originates from.
Implementation are "best effort". If a location cannot be made absolute, it may be returned as-is. Implementations are also free to throw a SettingsBuilderException to indicate that the given include location is not supported in this context.
string | $location |
SettingsBuilderException | if the given location cannot be used as an include by the current source. |
Implements MediaWiki\Settings\Source\SettingsIncludeLocator.
Definition at line 231 of file CachedSource.php.