*
* @see ProcessCacheLRU
* @ingroup Cache
+ * @since 1.23
*/
class MapCacheLRU {
/** @var Array */
$this->cache[$key] = $value;
}
+ /**
+ * Check if a key exists
+ *
+ * @param $key string
+ * @return bool
+ */
+ public function has( $key ) {
+ return isset( $this->cache[$key] );
+ }
+
/**
* Get the value for a key.
* This returns null if the key is not set.
* If the item is already set, it will be pushed to the top of the cache.
*
* @param $key string
- * @param $prop string
* @return mixed
*/
public function get( $key ) {