mirror of
https://github.com/MoePlayer/APlayer-Typecho.git
synced 2026-08-13 22:43:28 +08:00
26 lines
561 B
PHP
26 lines
561 B
PHP
<?php
|
|
class MetingCache implements MetingCacheI
|
|
{
|
|
private $redis = null;
|
|
public function __construct($option)
|
|
{
|
|
$this->redis = new Redis();
|
|
$this->redis->connect($option['host'], $option['port']);
|
|
}
|
|
public function install()
|
|
{
|
|
}
|
|
public function set($key, $value, $expire = 86400)
|
|
{
|
|
return $this->redis->set($key, $value, $expire);
|
|
}
|
|
public function get($key)
|
|
{
|
|
return $this->redis->get($key);
|
|
}
|
|
public function flush()
|
|
{
|
|
return $this->redis->flushDb();
|
|
}
|
|
}
|