diff --git a/sources/src/caching/gradle-home-extry-extractor.ts b/sources/src/caching/gradle-home-extry-extractor.ts index 9a761b23..e3ff0a05 100644 --- a/sources/src/caching/gradle-home-extry-extractor.ts +++ b/sources/src/caching/gradle-home-extry-extractor.ts @@ -134,7 +134,7 @@ abstract class AbstractEntryExtractor { ): Promise { const restoredEntry = await restoreCache([pattern], cacheKey, [], listener) if (restoredEntry) { - core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern}`) + core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern} in ${listener.restoredTime}`) return new ExtractedCacheEntry(artifactType, pattern, cacheKey) } else { core.info(`Did not restore ${artifactType} with key ${cacheKey} to ${pattern}`) @@ -232,8 +232,8 @@ abstract class AbstractEntryExtractor { cacheDebug(`No change to previously restored ${artifactType}. Not saving.`) entryListener.markNotSaved('contents unchanged') } else { - core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`) await saveCache([pattern], cacheKey, entryListener) + core.info(`Saved ${artifactType} with key ${cacheKey} to ${pattern} in ${entryListener.savedTime}`) } for (const file of matchingFiles) { diff --git a/sources/src/caching/gradle-user-home-cache.ts b/sources/src/caching/gradle-user-home-cache.ts index 5d86d84f..89933a51 100644 --- a/sources/src/caching/gradle-user-home-cache.ts +++ b/sources/src/caching/gradle-user-home-cache.ts @@ -68,7 +68,9 @@ export class GradleUserHomeCache { core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key) - core.info(`Restored ${this.cacheDescription} from cache key: ${cacheResult.key}`) + core.info( + `Restored ${this.cacheDescription} from cache key: ${cacheResult.key} in ${entryListener.restoredTime}` + ) try { await this.afterRestore(listener) @@ -120,9 +122,11 @@ export class GradleUserHomeCache { return } - core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`) const cachePath = this.getCachePath() await saveCache(cachePath, cacheKey, gradleHomeEntryListener) + core.info( + `Saved ${this.cacheDescription} with key ${cacheKey} from ${cachePath} in ${gradleHomeEntryListener.savedTime}` + ) return }