diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index ac2b49049..0dd243d51 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -41,7 +41,7 @@ jobs:
 
       - name: Cache GTest
         id: cache-gtest
-        uses: actions/cache@v3
+        uses: actions/cache@v4
         with:
           path: gtest/
           key: ${{runner.os}}-gtest-1.11
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index ab3ea940d..8bb6e19ad 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -42,7 +42,7 @@ jobs:
 
       - name: Cache GTest
         id: cache-gtest
-        uses: actions/cache@v3
+        uses: actions/cache@v4
         with:
           path: gtest/
           key: ${{runner.os}}-gtest-1.11-${{matrix.lib}}-${{matrix.arch}}-${{matrix.build_type}}
@@ -67,7 +67,7 @@ jobs:
 
       - name: Cache gflags
         id: cache-gflags
-        uses: actions/cache@v3
+        uses: actions/cache@v4
         with:
           path: gflags/
           key: ${{runner.os}}-gflags-2.2.2-${{matrix.lib}}-${{matrix.arch}}-${{matrix.build_type}}