mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
new cache_buster function
This commit is contained in:
@@ -32,4 +32,12 @@ class Paths
|
||||
}
|
||||
return $datadir . "/" . $path;
|
||||
}
|
||||
|
||||
function cache_buster($filepath) {
|
||||
$fullpath = $_SERVER['DOCUMENT_ROOT'] . $filepath;
|
||||
if (file_exists($fullpath)) {
|
||||
return base_url($filepath) . '?v=' . filemtime($fullpath);
|
||||
}
|
||||
return base_url($filepath);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user