We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 25bd103 + c67a25a commit 0420d03Copy full SHA for 0420d03
1 file changed
src/ThinkCache.php
@@ -5,6 +5,8 @@
5
use Webman\Bootstrap;
6
use Workerman\Timer;
7
use think\facade\Cache;
8
+use think\Container;
9
+use think\DbManager;
10
11
class ThinkCache implements Bootstrap
12
{
@@ -20,5 +22,10 @@ public static function start($worker)
20
22
Cache::get('ping');
21
23
});
24
}
25
+
26
+ if (class_exists(DbManager::class)) {
27
+ $manager_instance = Container::getInstance()->make(DbManager::class);
28
+ $manager_instance->setCache(Cache::store());
29
+ }
30
-}
31
+}
0 commit comments