Cache
in package
Map cache.
Tags
Table of Contents
Properties
- $dir : string
- $keepAlive : int
- $log : LoggerInterface
- $pdo : PDO
Methods
- __construct() : mixed
- getMap() : Map
- Creates a map object.
- putMap() : void
- Saves locally cached map metadata into the database.
Properties
$dir
private
string
$dir
$keepAlive
private
int
$keepAlive
$log
private
LoggerInterface
$log
$pdo
private
PDO
$pdo
Methods
__construct()
public
__construct(string $dbConfig, string $cacheDir, int $keepAlive, LoggerInterface $log) : mixed
Parameters
- $dbConfig : string
- $cacheDir : string
- $keepAlive : int
- $log : LoggerInterface
getMap()
Creates a map object.
public
getMap(string $url) : Map
If the map is not yet locally cached, caches it first.
If the locally cached map is outdated, fetches an up to date version.
Parameters
- $url : string
Return values
MapputMap()
Saves locally cached map metadata into the database.
public
putMap(Map $map) : void
Parameters
- $map : Map