@@ -265,7 +265,7 @@ final class ExportedJsonFile<T> extends ExportedObject {
265265 contentEncoding: 'gzip' ,
266266 cacheControl: 'public, max-age=${_maxAge .inSeconds }' ,
267267 custom: {
268- 'updated ' : clock.now ().toIso8601String (),
268+ 'validated ' : clock.now ().toIso8601String (),
269269 },
270270 );
271271 }
@@ -312,7 +312,7 @@ final class ExportedBlob extends ExportedObject {
312312 cacheControl: 'public, max-age=${_maxAge .inSeconds }' ,
313313 contentDisposition: 'attachment; filename="$_filename "' ,
314314 custom: {
315- 'updated ' : clock.now ().toIso8601String (),
315+ 'validated ' : clock.now ().toIso8601String (),
316316 },
317317 );
318318 }
@@ -347,11 +347,11 @@ final class ExportedBlob extends ExportedObject {
347347 if (await srcInfo case final srcInfo? ) {
348348 if (dstInfo.contentEquals (srcInfo)) {
349349 // If both source and dst exists, and their content matches, then
350- // we only need to update the "updated " metadata. And we only need
351- // to update the "updated " timestamp if it's older than
350+ // we only need to update the "validated " metadata. And we only
351+ // need to update the "validated " timestamp if it's older than
352352 // _retouchDeadline
353- final retouchDeadline = clock.agoBy (_retouchDeadline );
354- if (dstInfo.metadata.updated .isBefore (retouchDeadline)) {
353+ final retouchDeadline = clock.agoBy (_revalidateAfter );
354+ if (dstInfo.metadata.validated .isBefore (retouchDeadline)) {
355355 await _owner._bucket.updateMetadata (dst, metadata);
356356 }
357357 return ;
@@ -371,7 +371,7 @@ final class ExportedBlob extends ExportedObject {
371371 }
372372}
373373
374- const _retouchDeadline = Duration (days: 1 );
374+ const _revalidateAfter = Duration (days: 1 );
375375
376376extension on Bucket {
377377 Future <void > writeBytesIfDifferent (
@@ -381,7 +381,7 @@ extension on Bucket {
381381 ) async {
382382 if (await tryInfo (name) case final info? ) {
383383 if (info.isSameContent (bytes)) {
384- if (info.metadata.updated .isBefore (clock.agoBy (_retouchDeadline ))) {
384+ if (info.metadata.validated .isBefore (clock.agoBy (_revalidateAfter ))) {
385385 await updateMetadata (name, metadata);
386386 }
387387 return ;
@@ -416,7 +416,7 @@ extension on ObjectInfo {
416416}
417417
418418extension on ObjectMetadata {
419- DateTime get updated {
420- return DateTime .tryParse (custom? ['updated ' ] ?? '' ) ?? DateTime (0 );
419+ DateTime get validated {
420+ return DateTime .tryParse (custom? ['validated ' ] ?? '' ) ?? DateTime (0 );
421421 }
422422}
0 commit comments