+ [refac] close cache connection when program is shutdown.

This commit is contained in:
liugang
2024-11-20 15:42:49 +08:00
committed by 朱金勇
parent ccc5d3a888
commit 2e20324fe6
3 changed files with 27 additions and 0 deletions
+12
View File
@@ -215,6 +215,18 @@ class RedisDriver implements CacheInterface
return (bool) $this->redis->exists($key);
}
/**
* 关闭 Redis 连接。
* Close the Redis connection.
*
* @access public
* @return bool
*/
public function close()
{
return $this->redis->close();
}
/**
* 获取内存使用情况。
* Get memory usage.