Test 10-min cache (should skip calendar calls)

This commit is contained in:
Otto 2026-03-07 16:35:23 +01:00
parent f4eb0ad678
commit 4bf5ab2176
7 changed files with 32 additions and 2 deletions

View file

@ -7,3 +7,11 @@ db6f29e01a33d8ed8f127ff169d9f91d55e8a229:pending:1772897641
c0685dabfb48360a3abc103b75357f94e9f054b2:pending:1772897657
810d26b7af9c5d306e77fec290d360c7ac876b2e:pending:1772897661
3b54e0cb8c611d3f3525ad2386368f60200891f1:pending:1772897667
392ee723c3cf626d0e5281aa94771d7133bb345e:pending:1772897676
db6f29e01a33d8ed8f127ff169d9f91d55e8a229:pending:1772897680
4a6f5ed0c12315b0bc8a0fa5815ada1bd20e5963:pending:1772897683
46aded7b9582bbed673843e2cf8a3f8fa742ad91:pending:1772897687
c0685dabfb48360a3abc103b75357f94e9f054b2:pending:1772897691
810d26b7af9c5d306e77fec290d360c7ac876b2e:pending:1772897694
3b54e0cb8c611d3f3525ad2386368f60200891f1:pending:1772897698
ed2cd259e918344c5a21ecf884b3178b4256ea74:pending:1772897704

View file

@ -20,3 +20,11 @@ c0685dabfb48360a3abc103b75357f94e9f054b2:46aded7b9582bbed673843e2cf8a3f8fa742ad9
4a6f5ed0c12315b0bc8a0fa5815ada1bd20e5963:db6f29e01a33d8ed8f127ff169d9f91d55e8a229
db6f29e01a33d8ed8f127ff169d9f91d55e8a229:392ee723c3cf626d0e5281aa94771d7133bb345e
392ee723c3cf626d0e5281aa94771d7133bb345e:392ee723c3cf626d0e5281aa94771d7133bb345e^1
ed2cd259e918344c5a21ecf884b3178b4256ea74:3b54e0cb8c611d3f3525ad2386368f60200891f1
3b54e0cb8c611d3f3525ad2386368f60200891f1:810d26b7af9c5d306e77fec290d360c7ac876b2e
810d26b7af9c5d306e77fec290d360c7ac876b2e:c0685dabfb48360a3abc103b75357f94e9f054b2
c0685dabfb48360a3abc103b75357f94e9f054b2:46aded7b9582bbed673843e2cf8a3f8fa742ad91
46aded7b9582bbed673843e2cf8a3f8fa742ad91:4a6f5ed0c12315b0bc8a0fa5815ada1bd20e5963
4a6f5ed0c12315b0bc8a0fa5815ada1bd20e5963:db6f29e01a33d8ed8f127ff169d9f91d55e8a229
db6f29e01a33d8ed8f127ff169d9f91d55e8a229:392ee723c3cf626d0e5281aa94771d7133bb345e
392ee723c3cf626d0e5281aa94771d7133bb345e:392ee723c3cf626d0e5281aa94771d7133bb345e^1

Binary file not shown.

View file

@ -1 +1 @@
3b54e0cb8c611d3f3525ad2386368f60200891f1
ed2cd259e918344c5a21ecf884b3178b4256ea74

Binary file not shown.

View file

@ -108,7 +108,18 @@ for COMMIT in $COMMITS; do
# Cache as pending
cache_status "$COMMIT" "pending"
# Try to upgrade existing proof (only contacts calendars if pending)
# Skip upgrade if cache is fresh (< 10 min old)
CACHE_LINE=$(grep "^$COMMIT:" "$STATUS_CACHE" | tail -1)
CACHE_TIME=$(echo "$CACHE_LINE" | cut -d: -f3)
NOW=$(date +%s)
CACHE_AGE=$((NOW - CACHE_TIME))
if [ "$CACHE_AGE" -lt 600 ]; then
echo " - Pending (cached <10min, skipping calendar call)"
continue
fi
# Try to upgrade existing proof (contacts calendars)
echo " Upgrading pending proof..."
if ots upgrade "$PROOF_FILE" 2>/dev/null; then
echo " ✓ Upgraded to attested"
@ -116,6 +127,8 @@ for COMMIT in $COMMITS; do
UPDATED=$((UPDATED + 1))
else
echo " - Still pending (no upgrade available yet)"
# Update cache timestamp
cache_status "$COMMIT" "pending"
fi
else
# Generate new proof for this commit

1
test8.txt Normal file
View file

@ -0,0 +1 @@
# Fourth commit