From 801b400b6c078116859e83a532a44f2f83a527b7 Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 22 Jul 2024 19:18:42 +0300 Subject: [PATCH] not wait for cache record --- src/Abstract/Model/Connection.php | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/Abstract/Model/Connection.php b/src/Abstract/Model/Connection.php index 9f400469..2f46e44a 100644 --- a/src/Abstract/Model/Connection.php +++ b/src/Abstract/Model/Connection.php @@ -248,14 +248,22 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection string $request ): void { - $this->_database->renewCache( - $request, - $this->getMime(), - $this->getTitle(), - $this->getSubtitle(), - $this->getTooltip(), - $this->getData() - ); + // Not wait for database record + $pid = pcntl_fork(); + + if ($pid === 0) + { + $this->_database->renewCache( + $request, + $this->getMime(), + $this->getTitle(), + $this->getSubtitle(), + $this->getTooltip(), + $this->getData() + ); + + exit; + } } public function reset(): void