Skip to content

Commit

Permalink
Update index.php
Browse files Browse the repository at this point in the history
  • Loading branch information
askuric authored Jul 22, 2024
1 parent b94d54f commit 8b19cf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function get_name($str) {
}
$cache_file = '/tmp/arduino_lib_' . md5($lib) . '.cache';

if (file_exists($cache_file) && (time() - filemtime($cache_file) < 86000)) {
if (file_exists($cache_file) && (time() - filemtime($cache_file) < 6*60*60)) { // if 6 hours has passed from the last check
// Use cached version if it's less than 1 day
$data = json_decode(file_get_contents($cache_file), true);
$name = $data['name'];
Expand Down

0 comments on commit 8b19cf1

Please sign in to comment.