Improve cache filepaths

This commit is contained in:
grandeljay 2022-06-10 17:06:19 +02:00
parent 64a1d19518
commit b5e332463b
3 changed files with 20 additions and 1 deletions

View file

@ -8,6 +8,17 @@ namespace wishthis\Cache;
class Blog extends Cache
{
/**
* Private
*/
protected function getFilepath(): string
{
return parent::getFilepath() . '.json';
}
/**
* Public
*/
public function __construct($url)
{
parent::__construct($url);

View file

@ -33,7 +33,7 @@ class Cache
protected function getFilepath(): string
{
return $this->directory . '/' . $this->getIdentifier() . '.json';
return $this->directory . '/' . $this->getIdentifier();
}
protected function write(mixed $value): void

View file

@ -12,6 +12,14 @@ namespace wishthis\Cache;
class Embed extends Cache
{
/**
* Private
*/
protected function getFilepath(): string
{
return parent::getFilepath() . '.json';
}
/**
* Public
*/