Files
kiri-core/kiri-engine/Cache/ICache.php
T

66 lines
1.1 KiB
PHP
Raw Normal View History

2020-08-31 01:27:08 +08:00
<?php
/**
* Created by PhpStorm.
* User: whwyy
* Date: 2018/11/8 0008
* Time: 16:35
*/
2020-10-29 18:17:25 +08:00
declare(strict_types=1);
2020-12-17 14:09:14 +08:00
2021-08-11 01:04:57 +08:00
namespace Kiri\Cache;
2020-08-31 01:27:08 +08:00
/**
* Interface ICache
2021-08-11 01:04:57 +08:00
* @package Kiri\Kiri\Cache
2020-08-31 01:27:08 +08:00
*/
interface ICache
{
/**
* @param $key
* @param $val
2020-12-17 14:09:14 +08:00
* @return string|int
2020-08-31 01:27:08 +08:00
*/
2020-12-17 14:09:14 +08:00
public function set($key, $val): string|int;
2020-08-31 01:27:08 +08:00
/**
* @param $key
2020-12-17 14:09:14 +08:00
* @return string|int|bool
2020-08-31 01:27:08 +08:00
*/
2020-12-17 14:09:14 +08:00
public function get($key): string|int|bool;
2020-08-31 01:27:08 +08:00
/**
* @param $key
2020-12-17 14:09:14 +08:00
* @param array $hashKeys
* @return array|bool|null
2020-08-31 01:27:08 +08:00
*/
2020-12-17 14:09:14 +08:00
public function hMGet($key, array $hashKeys): array|bool|null;
2020-08-31 01:27:08 +08:00
/**
* @param $key
* @param array $val
* @return mixed
*/
2020-12-17 14:09:14 +08:00
public function hMSet($key, array $val): mixed;
2020-08-31 01:27:08 +08:00
/**
2020-12-17 14:09:14 +08:00
* @param string $key
* @param string $hashKey
* @return string|int|bool
2020-08-31 01:27:08 +08:00
*/
2020-12-17 14:09:14 +08:00
public function hGet(string $key, string $hashKey): string|int|bool;
2020-08-31 01:27:08 +08:00
/**
* @param $key
* @param $hashKey
* @param $hashValue
* @return mixed
*/
2020-12-17 14:09:14 +08:00
public function hSet($key, $hashKey, $hashValue): mixed;
2020-08-31 01:27:08 +08:00
/**
* @param $key
* @return bool
*/
2020-12-17 14:09:14 +08:00
public function exists($key): bool;
2020-08-31 01:27:08 +08:00
}