Refactor CacheConfiguration to remove the engine property and related methods, simplifying cache configuration management.

This commit is contained in:
netkas 2025-03-13 13:59:48 -04:00
parent 54b401b944
commit b6829ff2b5
Signed by: netkas
GPG key ID: 4D8629441B76E4CC
2 changed files with 1 additions and 14 deletions

View file

@ -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);

View file

@ -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.
*