A class that is used to cache data.
- Full name:
\yxorP\lib\http\cache
Checking if the cache file is valid and if it is, it is including the cache file.
public static get(?string $key = null): void
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$key |
?string |
Used to check if the cache file exists.
public static isValid(?string $key = null): bool
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$key |
?string |
A PHPDoc annotation that is used to tell the IDE that the function returns an array with the keys key
and path
.
private static gen(?string $key): array
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$key |
?string |
It's writing the content to the cache file.
public static set(mixed $content, ?string $key = null): void
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$content |
mixed | |
$key |
?string |
It's writing the content to the cache file.
public static write(?string $key = null): void
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$key |
?string |