diff options
author | Simon Rettberg | 2019-10-16 18:12:05 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-10-16 18:12:05 +0200 |
commit | 911658a381f511444412d8b6f241f8379e5ef286 (patch) | |
tree | 9146157ac65db3c2803ecff4313daae806409e0d /modules-available | |
parent | [minilinux] Rewrite for multiple version/sources handling (diff) | |
download | slx-admin-911658a381f511444412d8b6f241f8379e5ef286.tar.gz slx-admin-911658a381f511444412d8b6f241f8379e5ef286.tar.xz slx-admin-911658a381f511444412d8b6f241f8379e5ef286.zip |
[dozmod] Increase sat DB's launch counter on cache hit
Diffstat (limited to 'modules-available')
-rw-r--r-- | modules-available/dozmod/api.inc.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules-available/dozmod/api.inc.php b/modules-available/dozmod/api.inc.php index 74934dc9..d9f7354c 100644 --- a/modules-available/dozmod/api.inc.php +++ b/modules-available/dozmod/api.inc.php @@ -225,6 +225,12 @@ function outputResource($lecture_uuid, $resource) } $key = $resource . '_' . $lecture_uuid; if (cache_has($key)) { + if ($resource === 'metadata' || $resource === 'vmx') { + // HACK HACK HACK: Update launch counter as it was cached, + // otherwise dmsd would take care of increasing it... + Database::exec("UPDATE sat.lecture SET usecount = usecount + 1 WHERE lectureid = :lectureid", + ['lectureid' => $lecture_uuid], true); + } cache_get_passthru($key); } else { $value = _getVmData($lecture_uuid, $resource); |