File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,11 @@ public static function get_css_file_url() {
6060 public static function get_css_file_name () {
6161 $ css_content = static ::generate_css_content ();
6262 $ content_hash = md5 ( $ css_content );
63- return static ::get_css_file_prefix () . $ content_hash . '.css ' ;
63+
64+ // Add a timestamp as cache buster to ensure unique file names
65+ $ timestamp = time ();
66+
67+ return static ::get_css_file_prefix () . $ content_hash . '- ' . $ timestamp . '.css ' ;
6468 }
6569
6670 /**
@@ -214,6 +218,9 @@ public static function invalidate_css_file() {
214218 unlink ( $ old_file_path );
215219 }
216220 }
221+
222+ // Clear the cached file name - next generation will have a new timestamp
223+ delete_option ( static ::get_cache_option_name () );
217224 }
218225 }
219226}
You can’t perform that action at this time.
0 commit comments