Skip to content

Latest commit

 

History

History
150 lines (62 loc) · 1.58 KB

cache.md

File metadata and controls

150 lines (62 loc) · 1.58 KB

cache

A class that is used to cache data.

  • Full name: \yxorP\lib\http\cache

Methods

get

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

isValid

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

gen

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

set

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

write

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