mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Cleanup Cacher handling and added some documentation
This commit is contained in:
parent
9c0d31997a
commit
cb7dafba4d
1 changed files with 10 additions and 1 deletions
|
|
@ -213,6 +213,13 @@ class Actions
|
||||||
case 'suggestions':
|
case 'suggestions':
|
||||||
$mResult = [];
|
$mResult = [];
|
||||||
break;
|
break;
|
||||||
|
/* // See function Cacher
|
||||||
|
case 'cache':
|
||||||
|
$mResult = new \MailSo\Cache\Drivers\File(
|
||||||
|
\trim($this->oConfig->Get('cache', 'path', '')) ?: APP_PRIVATE_DATA . 'cache'
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -460,6 +467,9 @@ class Actions
|
||||||
return $this->oDomainProvider;
|
return $this->oDomainProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bForceFile is only used by admin session token
|
||||||
|
*/
|
||||||
public function Cacher(?Model\Account $oAccount = null, bool $bForceFile = false): \MailSo\Cache\CacheClient
|
public function Cacher(?Model\Account $oAccount = null, bool $bForceFile = false): \MailSo\Cache\CacheClient
|
||||||
{
|
{
|
||||||
$sKey = '';
|
$sKey = '';
|
||||||
|
|
@ -481,7 +491,6 @@ class Actions
|
||||||
\trim($this->oConfig->Get('cache', 'path', '')) ?: APP_PRIVATE_DATA . 'cache'
|
\trim($this->oConfig->Get('cache', 'path', '')) ?: APP_PRIVATE_DATA . 'cache'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// $sDriver = \strtoupper(\trim($this->oConfig->Get('cache', 'fast_cache_driver', 'files')));
|
|
||||||
$oDriver->setPrefix($sKey);
|
$oDriver->setPrefix($sKey);
|
||||||
|
|
||||||
$this->aCachers[$sIndexKey]->SetDriver($oDriver);
|
$this->aCachers[$sIndexKey]->SetDriver($oDriver);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue