Skip to content

Commit

Permalink
chore: add detailed logging when setting entity retention
Browse files Browse the repository at this point in the history
  • Loading branch information
hknots committed Feb 7, 2025
1 parent a42516d commit c527221
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ public void addResourceToCache(String resourceName, String key, FintResource res
linkService.mapLinks(resourceName, resource);
Cache<FintResource> cache = cacheService.getResourceCaches().get(resourceName);
if (header == null) {
log.debug("{} header is null, setting default entity retention: {}", ENTITY_RETENTION_TIME, System.currentTimeMillis());
log.debug("setting default entity retention: {} - {} - {}", resourceName, key, System.currentTimeMillis());
cache.put(key, resource, hashCodes(resource));
} else {
long entityRetentionTime = KafkaHeader.getLong(header);
log.info("{} header is present, setting entity retention to: {}", ENTITY_RETENTION_TIME, entityRetentionTime);
log.info("setting entity retention: {} - {} - {}", resourceName, key, entityRetentionTime);
cache.put(key, resource, hashCodes(resource), entityRetentionTime);
}
}
Expand Down

0 comments on commit c527221

Please sign in to comment.