martin-g commented on code in PR #2517:
URL: https://github.com/apache/avro/pull/2517#discussion_r1337674862


##########
.github/workflows/test-lang-rust-ci.yml:
##########
@@ -58,20 +58,59 @@ jobs:
       - name: Checkout
         uses: actions/checkout@v4
 
-      - name: Cache Cargo
+      - name: Cache Cargo for 1.65.0
+        if: matrix.rust == '1.65.0' && matrix.target == 
'x86_64-unknown-linux-gnu'
         uses: actions/cache@v3
         with:
           # these represent dependencies downloaded by cargo
           # and thus do not depend on the OS, arch nor rust version.
           path: ~/.cargo
-          key: cargo-cache1-
+          key: cargo-cache1-1.65.0-${{ hashFiles('**/Cargo.lock') }}
+
+      - name: Cache Cargo for 1.65.0 (Restore Only)
+        if: matrix.rust == '1.65.0' && matrix.target != 
'x86_64-unknown-linux-gnu'
+        uses: actions/cache/restore@v3

Review Comment:
   This looks weird. 
   ` actions/cache@v3` does two things - first it restores the cache and later 
in the post-processing saves the cache.
   Now you introduce the new `actions/cache/restore@v3` which gives you more 
control when to `restore` but it should be used with `actions/cache/save@v3` to 
have a better control **when** to `save`.
   Using both `actions/cache` with any of the new more granular actions does 
not make sense to me.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to