mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 08:05:34 +08:00
remove some unused class
This commit is contained in:
@@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
namespace ZM\DBCache;
|
|
||||||
|
|
||||||
|
|
||||||
class CourseCache implements DBCache
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private static $data;
|
|
||||||
|
|
||||||
public static function reset() {
|
|
||||||
self::$data = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
namespace ZM\DBCache;
|
|
||||||
|
|
||||||
|
|
||||||
interface DBCache
|
|
||||||
{
|
|
||||||
public static function reset();
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
namespace ZM\DBCache;
|
|
||||||
|
|
||||||
|
|
||||||
class DBCacheManager
|
|
||||||
{
|
|
||||||
public static function freeAllCache(){
|
|
||||||
DHUerCache::reset();
|
|
||||||
UserCache::reset();
|
|
||||||
GroupCache::reset();
|
|
||||||
CourseCache::reset();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
namespace ZM\DBCache;
|
|
||||||
|
|
||||||
|
|
||||||
class DHUerCache implements DBCache
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private static $data;
|
|
||||||
|
|
||||||
public static function reset() {
|
|
||||||
self::$data = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
namespace ZM\DBCache;
|
|
||||||
|
|
||||||
|
|
||||||
class GroupCache implements DBCache
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private static $data;
|
|
||||||
|
|
||||||
public static function reset() {
|
|
||||||
self::$data = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
namespace ZM\DBCache;
|
|
||||||
|
|
||||||
|
|
||||||
class UserCache implements DBCache
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private static $data;
|
|
||||||
|
|
||||||
public static function reset() {
|
|
||||||
self::$data = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -13,7 +13,6 @@ use ZM\Annotation\AnnotationParser;
|
|||||||
use ZM\Annotation\Swoole\SwooleEventAfter;
|
use ZM\Annotation\Swoole\SwooleEventAfter;
|
||||||
use ZM\Connection\ConnectionManager;
|
use ZM\Connection\ConnectionManager;
|
||||||
use ZM\DB\DB;
|
use ZM\DB\DB;
|
||||||
use ZM\DBCache\DBCacheManager;
|
|
||||||
use Framework\Console;
|
use Framework\Console;
|
||||||
use Framework\GlobalConfig;
|
use Framework\GlobalConfig;
|
||||||
use Framework\ZMBuf;
|
use Framework\ZMBuf;
|
||||||
@@ -45,7 +44,6 @@ class WorkerStartEvent implements SwooleEvent
|
|||||||
Console::info("Worker启动中");
|
Console::info("Worker启动中");
|
||||||
ZMBuf::resetCache(); //清空变量缓存
|
ZMBuf::resetCache(); //清空变量缓存
|
||||||
ZMBuf::set("wait_start", []); //添加队列,在workerStart运行完成前先让其他协程等待执行
|
ZMBuf::set("wait_start", []); //添加队列,在workerStart运行完成前先让其他协程等待执行
|
||||||
DBCacheManager::freeAllCache(); // 清空数据库缓存
|
|
||||||
$this->resetConnections();//释放所有与framework的连接
|
$this->resetConnections();//释放所有与framework的连接
|
||||||
|
|
||||||
//设置炸毛buf中储存的对象
|
//设置炸毛buf中储存的对象
|
||||||
|
|||||||
Reference in New Issue
Block a user