mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
cache connection data on browser close only
This commit is contained in:
parent
1cb3db9923
commit
48c682459d
6 changed files with 44 additions and 66 deletions
|
|
@ -84,18 +84,33 @@ class Browser
|
|||
'destroy',
|
||||
function()
|
||||
{
|
||||
// Save session
|
||||
// Save session data
|
||||
$pid = pcntl_fork();
|
||||
|
||||
if ($pid === 0)
|
||||
{
|
||||
// Reset previous records
|
||||
$this->database->cleanSession();
|
||||
|
||||
foreach ($this->container->tab->pages as $page)
|
||||
{
|
||||
// Save page session data
|
||||
$this->database->addSession(
|
||||
$page->navbar->request->getValue()
|
||||
);
|
||||
|
||||
// Cache connection pool data
|
||||
if ($page->connection)
|
||||
{
|
||||
$this->database->renewCache(
|
||||
$page->navbar->request->getValue(),
|
||||
$page->connection->getMime(),
|
||||
$page->connection->getTitle(),
|
||||
$page->connection->getSubtitle(),
|
||||
$page->connection->getTooltip(),
|
||||
$page->connection->getData()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
exit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue