BotMan版本: 2.6
PHP版本: 7.3.23
Laravel版本: 7.16.1
缓存驱动程序: LaravelCache
我在用botman做电报机器人。botman一切都很好,只是会话缓存时间不起作用。这是我的botman配置代码:
use BotMan\BotMan\Cache\LaravelCache;
use BotMan\BotMan\Drivers\DriverManager;
use BotMan\BotMan\BotManFactory;
$config = [
// Your driver-specific configuration
"botman" => [
'conversation_cache_time' => 720 ,
'user_cache_time' => 720,
],
"telegram" => [
"token" => env('TELEGRAM_TOKEN'),
]
];
// Load the driver(s) you want to use
DriverManager::loadDriver(\BotMan\Drivers\Telegram\TelegramDriver::class);
// Create an instance
$botman = BotManFactory::create($config, new LaravelCache());
// and other hears , fallback and conversations functions ...关于机器人和会话的一切都很好,但问题是基于我们必须使用驱动器缓存来使用会话的conversation document的会话现金时间,我使用的驱动程序是laravelCache,但我将conversation_cache_time设置为720分钟,但它只需要默认的30分钟。
我该怎么办?
提前谢谢。
发布于 2020-10-10 14:31:41
从他们的github中的这些行:
它必须是这样的:
$config = [
'user_cache_time' => 720,
'config' => [
'conversation_cache_time' => 720 ,
],
// Your driver-specific configuration
"telegram" => [
"token" => env('TELEGRAM_TOKEN'),
]
];而且它是有效的。
https://stackoverflow.com/questions/64240554
复制相似问题