]> _ Git - cubist_cms-back.git/commitdiff
wait #7673
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 30 Jul 2025 16:49:37 +0000 (18:49 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 30 Jul 2025 16:49:37 +0000 (18:49 +0200)
src/routes/cubist/backpack/cdnproxy.php

index 855d604a3324f8aebf4d9c565d251b90c07613ed..a320627c075dfdaec2e5fc34181e7860d961018d 100644 (file)
@@ -13,7 +13,7 @@ Route::group([
         $ext = array_pop($e);
         $cache = \Cubist\Util\Files\Files::mkdir(storage_path('app/cache/cdnproxy')) . sha1($url) . '.' . $ext;
 
-        if (!file_exists($cache)) {
+        if (!file_exists($cache) || filemtime($cache) < (time() - 604800)) {
             copy($url, $cache);
         }
         return \Cubist\Backpack\Http\Controllers\Base\XSendFileController::sendfile($cache);