2019-07-08 19:12:16 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Generic interface for object stores with key encoding methods.
|
|
|
|
|
*
|
|
|
|
|
* @ingroup Cache
|
|
|
|
|
* @since 1.34
|
|
|
|
|
*/
|
|
|
|
|
interface IStoreKeyEncoder {
|
|
|
|
|
/**
|
|
|
|
|
* Make a global cache key.
|
|
|
|
|
*
|
|
|
|
|
* @param string $class Key class
|
2019-12-08 11:05:18 +00:00
|
|
|
* @param string|int ...$components Key components (starting with a key collection name)
|
2019-07-20 16:49:06 +00:00
|
|
|
* @return string Colon-delimited list of $keyspace followed by escaped components
|
2019-07-08 19:12:16 +00:00
|
|
|
*/
|
2019-07-20 16:49:06 +00:00
|
|
|
public function makeGlobalKey( $class, ...$components );
|
2019-07-08 19:12:16 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Make a cache key, scoped to this instance's keyspace.
|
|
|
|
|
*
|
|
|
|
|
* @param string $class Key class
|
2019-12-08 11:05:18 +00:00
|
|
|
* @param string|int ...$components Key components (starting with a key collection name)
|
2019-07-20 16:49:06 +00:00
|
|
|
* @return string Colon-delimited list of $keyspace followed by escaped components
|
2019-07-08 19:12:16 +00:00
|
|
|
*/
|
2019-07-20 16:49:06 +00:00
|
|
|
public function makeKey( $class, ...$components );
|
2019-07-08 19:12:16 +00:00
|
|
|
}
|