summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/c/urweb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 12009f02..a6639ef2 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -4815,7 +4815,9 @@ void uw_Sqlcache_store(uw_context ctx, uw_Sqlcache_Cache *cache, char **keys, uw
update->value = value;
update->next = NULL;
// Can't use [uw_Sqlcache_getTimeNow] because it modifies state and we don't have the lock.
+ pthread_rwlock_rdlock(&cache->lockIn);
value->timeValid = cache->timeNow;
+ pthread_rwlock_unlock(&cache->lockIn);
if (ctx->cacheUpdateTail) {
ctx->cacheUpdateTail->next = update;
} else {