Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Improving docBlocks in API class file. See: wpsharks/comet-cache#334
  • Loading branch information
JasWSInc committed Sep 30, 2014
1 parent 2d23571 commit aa74098
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions quick-cache-pro/includes/api-class.php
Expand Up @@ -7,26 +7,6 @@
* @copyright WebSharks, Inc. <http://www.websharks-inc.com>
* @license GNU General Public License, version 2
*/
/*
* @raamdev This section could be removed later in favor of docBlocks I think.
*
* An API Class to expose various aspects of Quick Cache for use by theme/plugin developers.
*
* `quick_cache::version()`
* Gives you the current version string.
*
* `quick_cache::options()`
* Gives you the current array of configured options.
*
* `quick_cache::purge()`
* Purges expired cache files, leaving all others intact. This occurs automatically over time via WP Cron; but this will force an immediate purge if you so desire.
*
* `quick_cache::clear()`
* This erases the entire cache for the current blog. In a multisite network this impacts only the current blog, it does not clear the cache for other child blogs.
* `quick_cache::wipe()`
*
* This wipes out the entire cache. On a standard WP installation this is the same as quick_cache::clear(); but on a multisite installation it impacts the entire network (i.e. wipes the cache for all blogs in the network).
*/
namespace // Global namespace.
{
if(!defined('WPINC')) // MUST have WordPress.
Expand All @@ -38,6 +18,8 @@
class quick_cache
{
/**
* Current QC plugin instance.
*
* @return \quick_cache\plugin instance.
*/
public static function plugin()
Expand All @@ -46,6 +28,8 @@ public static function plugin()
}

/**
* Gives you the current version string.
*
* @return string Current version string.
*/
public static function version()
Expand All @@ -54,6 +38,8 @@ public static function version()
}

/**
* Gives you the current array of configured options.
*
* @return array Current array of options.
*/
public static function options()
Expand All @@ -62,6 +48,11 @@ public static function options()
}

/**
* Purges expired cache files, leaving all others intact.
*
* @note This occurs automatically over time via WP Cron;
* but this will force an immediate purge if you so desire.
*
* @return integer Total files purged (if any).
*/
public static function purge()
Expand All @@ -70,6 +61,11 @@ public static function purge()
}

/**
* This erases the entire cache for the current blog.
*
* @note In a multisite network this impacts only the current blog,
* it does not clear the cache for other child blogs.
*
* @return integer Total files cleared (if any).
*/
public static function clear()
Expand All @@ -78,6 +74,12 @@ public static function clear()
}

/**
* This wipes out the entire cache.
*
* @note On a standard WP installation this is the same as quick_cache::clear();
* but on a multisite installation it impacts the entire network
* (i.e. wipes the cache for all blogs in the network).
*
* @return integer Total files wiped (if any).
*/
public static function wipe()
Expand Down

0 comments on commit aa74098

Please sign in to comment.