If you want to make use of BotMans Conversation feature, you need to use a persistent cache driver, where BotMan can store and retrieve the conversations.
If not specified otherwise, BotMan will use the array
cache which is non-persistent.
{callout-info} If you use BotMan Studio it is not required to specify cache drivers manually, as Laravel handles this for you.
If your framework / cache driver is not explicitly supported by BotMan, you can see if your cache driver supports the PSR-6 Caching Interface. With the PSR-6 BotMan cache driver, you can use all supported cache drivers with BotMan.
use BotMan\BotMan\Cache\Psr6Cache;
$adapter = new MyCustomPsr6CacheAdapter();
$botman = BotManFactory::create($config, new Psr6Cache($adapter));
When using botman in an existing Laravel project, you can use the Botman's built in LaravelCache.
use BotMan\BotMan\Cache\LaravelCache;
$botman = BotManFactory::create($config, new LaravelCache());
Use any Doctrine Cache driver by passing it to the factory:
use BotMan\BotMan\Cache\DoctrineCache;
$botman = BotManFactory::create($config, new DoctrineCache($doctrineCacheDriver));
Use any CodeIgniter Cache adapter by passing it to the factory:
use BotMan\BotMan\Cache\CodeIgniterCache;
$this->load->driver('cache');
$botman = BotManFactory::create($config, new CodeIgniterCache($this->cache->file));
Use your Redis in-memory data structure to cache BotMan conversation information. If you have the igbinary module available, it will be used instead of standard PHP serializer:
use BotMan\BotMan\Cache\RedisCache;
$botman = BotManFactory::create($config, new RedisCache('127.0.0.1', 6379));
Use any Symfony Cache component by passing it to the factory:
use BotMan\BotMan\Cache\SymfonyCache;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
$adapter = new FilesystemAdapter();
$botman = BotManFactory::create($config, new SymfonyCache($adapter));