Service
in package
Wrapper handling boilerplate code around the ARCHE microservice initialization
Requires following config file structure:
dissCacheService:
db: sqlite:/some/path
log:
file: /some/path
level: debug
ttl:
resource: 3600
response: 31536000
repoDb:
- repoConfigPath.yaml
allowedNmsp:
- https://one
- https://another
metadataMode: parents
parentProperty: ""
resourceProperties: []
relativesProperties: []
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- getConfig() : object
- getLog() : Log
- processException() : ResponseCacheItem
- serveRequest() : ResponseCacheItem
- setCallback() : void
Properties
$cacheDb
private
CachePdo
$cacheDb
$clbck
private
callable
$clbck
$config
private
object
$config
$log
private
Log
$log
Methods
__construct()
public
__construct(string $confFile) : mixed
Parameters
- $confFile : string
getConfig()
public
getConfig() : object
Return values
objectgetLog()
public
getLog() : Log
Return values
LogprocessException()
public
processException(Throwable $e) : ResponseCacheItem
Parameters
- $e : Throwable
Return values
ResponseCacheItemserveRequest()
public
serveRequest(string $id, array<string|int, mixed> $param[, bool $clearCache = false ]) : ResponseCacheItem
Parameters
- $id : string
- $param : array<string|int, mixed>
- $clearCache : bool = false
Return values
ResponseCacheItemsetCallback()
public
setCallback(callable $clbck) : void
Parameters
- $clbck : callable
-
response cache miss handler with signature
fn(acdhOeaw\arche\lib\RepoResourceInterface $res, array $param)
where the$param
will passed from theserveRequest()
method$param
parameter.