MediaWiki master
|
Helper class for mapping value objects representing basic entities to cache keys. More...
Static Public Member Functions | |
static | getKeyForPage ( $page) |
Helper class for mapping value objects representing basic entities to cache keys.
Rationale: The logic for deriving the cache key should not be in the value object themselves for two reasons: Firstly, the value object should not contain knowledge about caching or keys in general. Secondly, all implementations of a given interface must have the exact same logic for deriving the cache key. Otherwise, caches will break when different implementations are used when interacting with a cache.
Furthermore, the logic for deriving cache keys should not be in a service instance: there can only ever be one implementation, it must not depend on configuration, and it should never change.
Definition at line 43 of file CacheKeyHelper.php.
|
static |
LinkTarget | PageReference | $page |
Definition at line 59 of file CacheKeyHelper.php.
Referenced by MediaWiki\Cache\LinkBatch\addResultToCache().