Refactor CacheConfiguration to remove the engine property and related methods, simplifying cache configuration management.
This commit is contained in:
parent
54b401b944
commit
b6829ff2b5
2 changed files with 1 additions and 14 deletions
|
@ -109,7 +109,6 @@
|
|||
|
||||
// Cache layer configuration
|
||||
$config->setDefault('cache.enabled', false);
|
||||
$config->setDefault('cache.engine', 'redis');
|
||||
$config->setDefault('cache.host', '127.0.0.1');
|
||||
$config->setDefault('cache.port', 6379);
|
||||
$config->setDefault('cache.username', null);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
class CacheConfiguration
|
||||
{
|
||||
private bool $enabled;
|
||||
private string $engine;
|
||||
private string $host;
|
||||
private int $port;
|
||||
private ?string $username;
|
||||
|
@ -38,7 +37,6 @@
|
|||
public function __construct(array $data)
|
||||
{
|
||||
$this->enabled = (bool)$data['enabled'];
|
||||
$this->engine = (string)$data['engine'];
|
||||
$this->host = (string)$data['host'];
|
||||
$this->port = (int)$data['port'];
|
||||
$this->username = $data['username'] ? (string)$data['username'] : null;
|
||||
|
@ -58,17 +56,7 @@
|
|||
{
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the engine name.
|
||||
*
|
||||
* @return string Returns the name of the engine.
|
||||
*/
|
||||
public function getEngine(): string
|
||||
{
|
||||
return $this->engine;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the host value.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue