From 77cc3d9444a36be47fa0563483510fa0133c3267 Mon Sep 17 00:00:00 2001 From: Kharkunov Eugene Date: Sat, 30 Nov 2024 09:53:36 +0200 Subject: [PATCH] Use full blob key when touch object in the cache. --- .../main/java/com/defold/extender/cache/GCPDataCache.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/src/main/java/com/defold/extender/cache/GCPDataCache.java b/server/src/main/java/com/defold/extender/cache/GCPDataCache.java index 99bf6e9a..fc80fb5a 100644 --- a/server/src/main/java/com/defold/extender/cache/GCPDataCache.java +++ b/server/src/main/java/com/defold/extender/cache/GCPDataCache.java @@ -44,13 +44,14 @@ public boolean exists(String key) { @Override public void touch(String key) { - Blob blob = storage.get(this.bucketName, getBlobKey(key)); + String fullKey = getBlobKey(key); + Blob blob = storage.get(this.bucketName, fullKey); if (blob != null) { try { // metadata can be updated only by copying object to itself - blob.copyTo(this.bucketName, key); + blob.copyTo(this.bucketName, fullKey); } catch (StorageException exc) { - LOGGER.warn(String.format("Exception when touch object '%s' %s", key, exc.getReason())); + LOGGER.warn(String.format("Exception when touch object '%s' %s", fullKey, exc.getReason())); } } }