/**
  * Clears all the plugin caches.
  * @since       3
  * @return      void
  */
 private function _clearAllCaches($oFactory)
 {
     // Clear transients.
     AmazonAutoLinks_WPUtility::cleanTransients(AmazonAutoLinks_Registry::TRANSIENT_PREFIX);
     AmazonAutoLinks_WPUtility::cleanTransients('apf_');
     $_oCacheTable = new AmazonAutoLinks_DatabaseTable_request_cache(AmazonAutoLinks_Registry::$aDatabaseTables['request_cache']);
     $_oCacheTable->delete();
     $_oProductTable = new AmazonAutoLinks_DatabaseTable_product(AmazonAutoLinks_Registry::$aDatabaseTables['product']);
     $_oProductTable->delete();
     $oFactory->setSettingNotice(__('Caches have been cleared.', 'amazon-auto-links'));
 }
コード例 #2
0
 /**
  * The plugin activation callback method.
  */
 public function replyToPluginDeactivation()
 {
     // Clean transients.
     AmazonAutoLinks_WPUtility::cleanTransients(AmazonAutoLinks_Registry::TRANSIENT_PREFIX);
     AmazonAutoLinks_WPUtility::cleanTransients('apf_');
 }