Improve cache filepaths
This commit is contained in:
parent
64a1d19518
commit
b5e332463b
3 changed files with 20 additions and 1 deletions
11
src/classes/cache/blog.php
vendored
11
src/classes/cache/blog.php
vendored
|
@ -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);
|
||||
|
|
2
src/classes/cache/cache.php
vendored
2
src/classes/cache/cache.php
vendored
|
@ -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
|
||||
|
|
8
src/classes/cache/embed.php
vendored
8
src/classes/cache/embed.php
vendored
|
@ -12,6 +12,14 @@ namespace wishthis\Cache;
|
|||
|
||||
class Embed extends Cache
|
||||
{
|
||||
/**
|
||||
* Private
|
||||
*/
|
||||
protected function getFilepath(): string
|
||||
{
|
||||
return parent::getFilepath() . '.json';
|
||||
}
|
||||
|
||||
/**
|
||||
* Public
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue