-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
12 changed files
with
426 additions
and
672 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea/ | ||
vendor | ||
coverage.xml |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
die( "Run this script with WP-CLI: `wp eval-file bin/cache.php` \n" ); | ||
} | ||
|
||
set_time_limit( 0 ); | ||
|
||
$cache_key = \PressbooksStats\Stats\get_admin_page_html_cache_key(); | ||
|
||
delete_site_transient( $cache_key ); | ||
|
||
\PressbooksStats\Stats\cache_stats_admin_page(); | ||
|
||
$html = get_site_transient( \PressbooksStats\Stats\get_admin_page_html_cache_key() ); | ||
|
||
if ( empty( $html ) ) { | ||
echo "Failed to cache the stats dashboard... \n"; | ||
} else { | ||
echo "Successfully cached the stats dashboard! \n"; | ||
} |
This file contains 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 characters
Oops, something went wrong.