+ [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
@@ -893,6 +893,18 @@ class cache
return $this->cache->clear();
}
/**
* 关闭缓存连接。
* Close cache connection.
*
* @access public
* @return void
*/
public function close()
{
if(method_exists($this->cache, 'close')) $this->cache->close();
}
/**
* 获取内存使用情况。
* Get memory usage.