WIP Now with some formatting.

This commit is contained in:
ekes 2019-04-28 17:23:55 +02:00
parent 649f84ad8c
commit 98872a46bc
3 changed files with 328 additions and 81 deletions

View file

@ -57,11 +57,11 @@ class Squat_Radar_Connector {
}
function events( $facets, $fields = [], $language = NULL, $limit = 10, $expiration = 10800, $reset = FALSE ) {
$fields = array_merge($fields, ['uuid', 'url']);
$transient_key = 'squat_radar_events_' . sha1(implode($facets) . implode($fields) . $language . $limit);
if (! $reset && $data = get_transient( $transient_key )) {
return $data;
}
$query = $this->encode_api_query( $facets, $fields, $language, $limit );
$events = $this->get_events($query);