Closed olrtan closed 2 years ago
Hi @olrtan , that's a good question. I've never tried it. You could try something like this:
$client= Cache::remember('client', 100000 * 60, function () {
$client = Webklex\IMAP\Facades\Client::account('default');
$client->connect();
return $client;
});
..but I don't know if the resource / connection itself is managed properly. I also don't know if it is a good idea in general - something has to manage the open connection - does it get dropped by the sever after a certain time? Will it reconnect by itself if required? Is the session still valid after x minutes / days?
Best regards,
Hi , I want to ask you: can i make the connection cache?
if yes how ? thanks you