Last active
May 23, 2023 14:39
-
-
Save mustafauysal/c81e0141bd03120b71b37dfca40651b1 to your computer and use it in GitHub Desktop.
Revisions
-
mustafauysal revised this gist
May 23, 2023 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,10 @@ <?php add_action( 'plugins_loaded', function () { add_action( 'powered_cache_flushed', 'flush_phast_cache' ); add_action( 'powered_cache_purge_all_cache', 'flush_phast_cache' ); add_action( 'powered_cache_clean_site_cache_dir', 'flush_phast_cache' ); } ); function flush_phast_cache() { $cache_dir = WP_CONTENT_DIR . '/cache/'; @@ -12,3 +14,4 @@ function flush_phast_cache() { @unlink( $file ); } } -
mustafauysal created this gist
May 22, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ <?php add_action( 'powered_cache_flushed', 'flush_phast_cache' ); add_action( 'powered_cache_purge_all_cache', 'flush_phast_cache' ); add_action( 'powered_cache_clean_site_cache_dir', 'flush_phast_cache' ); function flush_phast_cache() { $cache_dir = WP_CONTENT_DIR . '/cache/'; $db_files = glob( $cache_dir . 'phast.*/*sqlite3*' ); foreach ( $db_files as $file ) { @unlink( $file ); } }