mirror of
https://github.com/friendica/friendica
synced 2025-05-10 20:24:10 +02:00
Improve encapsulation
This commit is contained in:
parent
11a8bd17e3
commit
fef10e8a57
4 changed files with 21 additions and 24 deletions
|
@ -57,7 +57,7 @@ class ConfigTransaction implements ISetConfigValuesTransactionally
|
|||
/** {@inheritDoc} */
|
||||
public function delete(string $cat, string $key): ISetConfigValuesTransactionally
|
||||
{
|
||||
$this->cache->delete($cat, $key, Cache::SOURCE_DATA);
|
||||
$this->cache->delete($cat, $key);
|
||||
$this->changedConfig = true;
|
||||
|
||||
return $this;
|
||||
|
@ -72,7 +72,7 @@ class ConfigTransaction implements ISetConfigValuesTransactionally
|
|||
}
|
||||
|
||||
try {
|
||||
$this->config->load($this->cache);
|
||||
$this->config->setCacheAndSave($this->cache);
|
||||
$this->cache = clone $this->config->getCache();
|
||||
} catch (\Exception $e) {
|
||||
throw new ConfigPersistenceException('Cannot save config', $e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue