Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Commit

Permalink
Cache supported plugins on activation for a better first impression. …
Browse files Browse the repository at this point in the history
…Cache for 7 days (up from 3).
  • Loading branch information
paulgibbs committed Apr 28, 2012
1 parent 60a04a4 commit d9c4221
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/dpa-common-functions.php
Expand Up @@ -384,8 +384,8 @@ function dpa_get_supported_plugins() {
$plugin->contributors_raw = $plugin->contributors;
$plugin->contributors = dpa_supported_plugins_get_contributor_data( $plugin->contributors );

// Cache data for 72 hours
set_transient( 'dpa_plugin_' . $slug, $plugin, 60 * 60 * 24 * 3 );
// Cache data for 1 week
set_transient( 'dpa_plugin_' . $slug, $plugin, 60 * 60 * 24 * 7 );

$data = $plugin;
}
Expand Down
3 changes: 3 additions & 0 deletions includes/dpa-core-hooks.php
Expand Up @@ -66,6 +66,9 @@
add_action( 'dpa_activation', 'flush_rewrite_rules' );
add_action( 'dpa_deactivation', 'flush_rewrite_rules' );

// Cache supported plugins on activation for a good first impression
add_action( 'dpa_activation', 'dpa_get_supported_plugins' );


// wp-admin stuff
if ( is_admin() ) {
Expand Down

0 comments on commit d9c4221

Please sign in to comment.