Constructor that sets up the DiskCache.
DiskCache
__construct
([string $directory = null])
-
string
$directory: The directory to use. (Optional)
Redefinition of:
- Cache::__construct()
- Protected constructor that sets a DefaultCachePolicy.
Removes all data from the cache.
void
clear
()
Redefinition of:
- Cache::clear()
- Removes all data from the cache.
Checks if data associated with a hash exists in the cache.
boolean
contains
(string $hash)
-
string
$hash: The hash of the entry to be checked.
Redefinition of:
- Cache::contains()
- Checks if data associated with a hash exists in the cache.
Checks if data associated with a hash is expired.
boolean
isExpired
(string $hash)
-
string
$hash: The hash of the entry to be checked.
Redefinition of:
- Cache::isExpired()
- Checks if data associated with a hash is expired.
Loads data from the cache.
string
load
(string $hash)
-
string
$hash: The hash of the entry to be loaded.
Redefinition of:
- Cache::load()
- Loads data from the cache.
Removes data from the cache.
void
remove
(string $hash)
-
string
$hash: The hash of the entry to be removed.
Redefinition of:
- Cache::remove()
- Removes data from the cache.
Stores data in the cache.
void
store
(string $hash, string $data, string $expiration)
-
string
$hash: The hash of the data to be stored.
-
string
$data: The data to be stored.
-
string
$expiration: The expiration time of the data (unix timestamp).
Redefinition of:
- Cache::store()
- Stores data in the cache.
Inherited Methods
Inherited From Cache
Cache::__construct()
Cache::clear()
Cache::contains()
Cache::createHash()
Cache::getPolicy()
Cache::isExpired()
Cache::load()
Cache::remove()
Cache::setPolicy()
Cache::store()