CacheManager
in package
Cache Manager class.
Table of Contents
Methods
- Exists() : bool
- Checks if the cache exists for the given file.
- Get() : string|null
- Gets the cached file content.
- GetPath() : string
- Gets the cache file path.
- Put() : string
- Puts a file into the cache.
- _getPath() : string
- Gets the cache file path.
Methods
Exists()
Checks if the cache exists for the given file.
public
static Exists(string $section, string $fileName) : bool
Parameters
- $section : string
-
The cache section
- $fileName : string
-
The name of the file
Return values
bool —True if the cache exists, otherwise false
Get()
Gets the cached file content.
public
static Get(string $section, string $fileName) : string|null
Parameters
- $section : string
-
The cache section
- $fileName : string
-
The name of the file
Return values
string|null —The content of the cached file, or null if not found
GetPath()
Gets the cache file path.
public
static GetPath(string $section, string $fileName) : string
Parameters
- $section : string
-
The cache section
- $fileName : string
-
The name of the file
Return values
string —The cache file path
Put()
Puts a file into the cache.
public
static Put(string $section, string $fileName, string $fileContent) : string
Parameters
- $section : string
-
The cache section
- $fileName : string
-
The name of the file
- $fileContent : string
-
The content of the file
Return values
string —The path to the cached file
_getPath()
Gets the cache file path.
private
static _getPath(string $section, string $fileName) : string
Parameters
- $section : string
-
The cache section
- $fileName : string
-
The name of the file
Return values
string —The cache file path