Service for caching the latest EntityRevision of an Entity.
More...
Service for caching the latest EntityRevision of an Entity.
- Copyright
- GPL-2.0-or-later
- Author
- Marius Hoch
◆ __construct()
Wikibase\Lib\Store\EntityRevisionCache::__construct |
( |
BagOStuff |
$cache, |
|
|
|
$cacheDuration = 3600 , |
|
|
|
$cacheKeyPrefix = 'wbentity' |
|
) |
| |
- Parameters
-
BagOStuff | $cache | The cache to use |
int | $cacheDuration | Cache duration in seconds. Defaults to 3600 (1 hour). |
string | $cacheKeyPrefix | The key prefix to use for constructing cache keys. Defaults to "wbentity". There should be no reason to change this. |
◆ delete()
Wikibase\Lib\Store\EntityRevisionCache::delete |
( |
EntityId |
$entityId | ) |
|
◆ get()
Wikibase\Lib\Store\EntityRevisionCache::get |
( |
EntityId |
$entityId | ) |
|
Get the latest EntityRevision from cache.
Note: This might return stale data!
- Parameters
-
- Returns
- EntityRevision|null Null if the EntityRevision is not cached.
◆ getCacheKey()
Wikibase\Lib\Store\EntityRevisionCache::getCacheKey |
( |
EntityId |
$entityId | ) |
|
|
private |
Returns a cache key suitable for the given entity.
- Parameters
-
- Returns
- string
◆ set()
Wikibase\Lib\Store\EntityRevisionCache::set |
( |
EntityRevision |
$entityRevision | ) |
|
◆ $cache
Wikibase\Lib\Store\EntityRevisionCache::$cache |
|
private |
◆ $cacheKeyPrefix
Wikibase\Lib\Store\EntityRevisionCache::$cacheKeyPrefix |
|
private |
◆ $cacheTimeout
Wikibase\Lib\Store\EntityRevisionCache::$cacheTimeout |
|
private |
The documentation for this class was generated from the following file: