Creates a hash from last.fm API request parameters.
static
string
createHash
(array $params)
-
array
$params: An associative array of last.fm API request parameters.
Protected constructor that sets a DefaultCachePolicy.
Cache
__construct
()
Redefined in descendants as:
Removes all data from the cache.
void
clear
()
Redefined in descendants as:
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.
Redefined in descendants as:
Returns the CachePolicy that's used.
Checks if data associated with a hash is expired.
boolean
isExpired
(string $hash)
-
string
$hash: The hash of the entry to be checked.
Redefined in descendants as:
Loads data from the cache.
string
load
(string $hash)
-
string
$hash: The hash of the entry to be loaded.
Redefined in descendants as:
Removes data from the cache.
void
remove
(string $hash)
-
string
$hash: The hash of the entry to be removed.
Redefined in descendants as:
Sets the CachePolicy to be used.
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).
Redefined in descendants as: