Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

doc blocks cache

  • Loading branch information...
commit 579210d4002b25fd76df7d008aca84ae91a685e6 1 parent 88d3c55
@elinw authored
View
36 libraries/joomla/cache/cache.php
@@ -25,16 +25,28 @@
// Almost everything must be public here to allow overloading.
+
+/**
+ * Class that handles cache routines.
+ *
+ * @package Joomla.Platform
+ * @subpackage Access
+ * @since 11.1
+ */
class JCache extends JObject
{
/**
- * @var object Storage handler
+ * Storage handler
+ *
+ * @var object
* @since 11.1
*/
public static $_handler = array();
/**
- * @var Options
+ * Options
+ *
+ * @var Array
* @since 11.1
*/
public $_options;
@@ -81,6 +93,7 @@ public function __construct($options)
* @param array $options The array of options
*
* @return JCache A JCache object
+ *
* @since 11.1
*/
public static function getInstance($type = 'output', $options = array())
@@ -92,6 +105,7 @@ public static function getInstance($type = 'output', $options = array())
* Get the storage handlers
*
* @return array An array of available storage handlers
+ *
* @since 11.1
*/
public static function getStores()
@@ -122,6 +136,7 @@ public static function getStores()
* @param boolean $enabled True to enable caching
*
* @return void
+ *
* @since 11.1
*/
public function setCaching($enabled)
@@ -133,6 +148,7 @@ public function setCaching($enabled)
* Get caching state
*
* @return boolean Caching state
+ *
* @since 11.1
*/
public function getCaching()
@@ -146,6 +162,7 @@ public function getCaching()
* @param integer $lt Cache lifetime
*
* @return void
+ *
* @since 11.1
*/
public function setLifeTime($lt)
@@ -160,6 +177,7 @@ public function setLifeTime($lt)
* @param string $group The cache data group
*
* @return mixed boolean False on failure or a cached data string
+ *
* @since 11.1
*/
public function get($id, $group=null)
@@ -179,6 +197,7 @@ public function get($id, $group=null)
* Get a list of all cached data
*
* @return mixed Boolean false on failure or an object with a list of cache groups and data
+ *
* @since 11.1
*/
public function getAll()
@@ -199,6 +218,7 @@ public function getAll()
* @param mixed $data The data to store
*
* @return boolean True if cache stored
+ *
* @since 11.1
*/
public function store($data, $id, $group=null)
@@ -222,6 +242,7 @@ public function store($data, $id, $group=null)
* @param string $group The cache data group
*
* @return boolean True on success, false otherwise
+ *
* @since 11.1
*/
public function remove($id, $group=null)
@@ -247,6 +268,7 @@ public function remove($id, $group=null)
* @param string $mode The mode for cleaning cache [group|notgroup]
*
* @return boolean True on success, false otherwise
+ *
* @since 11.1
*/
public function clean($group=null, $mode='group')
@@ -266,6 +288,7 @@ public function clean($group=null, $mode='group')
* Garbage collect expired cache data
*
* @return boolean True on success, false otherwise.
+ *
* @since 11.1
*/
public function gc()
@@ -286,6 +309,7 @@ public function gc()
* @param $locktime
*
* @return boolean True on success, false otherwise.
+ *
* @since 11.1
*/
public function lock($id,$group=null,$locktime=null)
@@ -359,6 +383,7 @@ public function lock($id,$group=null,$locktime=null)
* @param string $group The cache data group
*
* @return boolean True on success, false otherwise.
+ *
* @since 11.1
*/
public function unlock($id,$group=null)
@@ -386,6 +411,7 @@ public function unlock($id,$group=null)
* Get the cache storage handler
*
* @return JCacheStorage A JCacheStorage object
+ *
* @since 11.1
*/
public function &_getStorage()
@@ -408,6 +434,7 @@ public function &_getStorage()
* @param array Array of options
*
* @return string Body of cached data
+ *
* @since 11.1
*/
public static function getWorkarounds($data, $options = array())
@@ -461,6 +488,7 @@ public static function getWorkarounds($data, $options = array())
* @param array $options Array of options
*
* @return string Data to be cached
+ *
* @since 11.1
*/
public static function setWorkarounds($data,$options=array())
@@ -557,6 +585,7 @@ public static function setWorkarounds($data,$options=array())
* Create safe id for cached data from url parameters set by plugins and framework
*
* @return string md5 encoded cacheid
+ *
* @since 11.1
*/
public static function makeId()
@@ -599,6 +628,7 @@ public static function makeId()
* @param string A path to search.
*
* @return array An array with directory elements
+ *
* @since 11.1
*/
public static function addIncludePath($path='')
@@ -614,4 +644,4 @@ public static function addIncludePath($path='')
}
return $paths;
}
-}
+}
View
21 libraries/joomla/cache/controller.php
@@ -25,7 +25,9 @@ class JCacheController
public $cache;
/**
- * @var array Array of options
+ * Array of options
+ *
+ * @var array
* @since 11.1
*/
public $options;
@@ -34,6 +36,7 @@ class JCacheController
* Constructor
*
* @param array $options Array of options
+ *
* @since 11.1
*/
public function __construct($options)
@@ -50,9 +53,13 @@ public function __construct($options)
}
/**
+ * Magic method to proxy JCacheControllerMethods
+ *
+ * @param string $name Name of the function
+ * @param array $arguments Array of arguments for the function
+ *
+ * @return mixed
*
- * @param $name
- * @param $arguments
* @since 11.1
*/
public function __call ($name, $arguments)
@@ -68,6 +75,7 @@ public function __call ($name, $arguments)
* @param array $options Array of options
*
* @return JCache A JCache object
+ *
* @since 11.1
*/
public static function getInstance($type = 'output', $options = array())
@@ -98,6 +106,7 @@ public static function getInstance($type = 'output', $options = array())
* @param boolean $enabled True to enable caching
*
* @return void
+ *
* @since 11.1
*/
public function setCaching($enabled)
@@ -111,6 +120,7 @@ public function setCaching($enabled)
* @param integer $lt Cache lifetime
*
* @return void
+ *
* @since 11.1
*/
public function setLifeTime($lt)
@@ -125,6 +135,7 @@ public function setLifeTime($lt)
* @param string A path to search.
*
* @return array An array with directory elements
+ *
* @since 11.1
*/
public static function addIncludePath($path='')
@@ -148,6 +159,7 @@ public static function addIncludePath($path='')
* @param string $group The cache data group
*
* @return mixed False on no result, cached object otherwise
+ *
* @since 11.1
*/
public function get($id, $group=null)
@@ -181,6 +193,7 @@ public function get($id, $group=null)
* @param mixed $data The data to store
*
* @return boolean True if cache was stored
+ *
* @since 11.1
*/
public function store($data, $id, $group=null)
@@ -201,4 +214,4 @@ public function store($data, $id, $group=null)
return $sucess;
}
-}
+}
View
55 libraries/joomla/cache/storage.php
@@ -19,43 +19,57 @@
class JCacheStorage
{
/**
- * @var string Rawname
+ * Rawname
+ *
+ * @var string
* @since 11.1
*/
protected $rawname;
/**
- * @var Now
+ * Now
+ *
+ * @var datetime
* @since 11.1
*/
public $_now;
/**
- * @var Lifetime
+ * Cache lifetime
+ *
+ * @var integer
* @since 11.1
*/
public $_lifetime;
/**
- * @var Locking
+ * Locking
+ *
+ * @var boolean
* @since 11.1
*/
public $_locking;
/**
- * @var Language
+ * Language
+ *
+ * @var string
* @since 11.1
*/
public $_language;
/**
- * @var Application
+ * Application
+ *
+ * @var
* @since 11.1
*/
public $_application;
/**
- * @var string Hash
+ * Hash
+ *
+ * @var string
* @since 11.1
*/
public $_hash;
@@ -93,7 +107,7 @@ public function __construct($options = array())
* if it doesn't already exist.
*
* @param string $handler The cache storage handler to instantiate
- * @param array $options
+ * @param array $options Array of handler options
*
* @return JCacheStorageHandler A JCacheStorageHandler object
*
@@ -197,11 +211,10 @@ public function remove($id, $group)
/**
* Clean cache for a group given a mode.
*
- * group mode : cleans all cache in the group
- * notgroup mode : cleans all cache not in the group
- *
* @param string $group The cache data group
* @param string $mode The mode for cleaning cache [group|notgroup]
+ * group mode : cleans all cache in the group
+ * notgroup mode : cleans all cache not in the group
*
* @return boolean True on success, false otherwise
* @since 11.1
@@ -215,6 +228,7 @@ public function clean($group, $mode = null)
* Garbage collect expired cache data
*
* @return boolean True on success, false otherwise.
+ *
* @since 11.1
*/
public function gc()
@@ -226,6 +240,7 @@ public function gc()
* Test to see if the storage handler is available.
*
* @return boolean True on success, false otherwise
+ *
* @since 11.1.
*/
public static function test()
@@ -236,10 +251,12 @@ public static function test()
/**
* Lock cached item
*
- * @param string $id The cache data id
- * @param string $group The cache data group
- * @param integer $locktime Cached item max lock time
+ * @param string $id The cache data id
+ * @param string $group The cache data group
+ * @param integer $locktime Cached item max lock time
+ *
* @return boolean True on success, false otherwise.
+ *
* @since 11.1
*/
public function lock($id,$group,$locktime)
@@ -250,8 +267,8 @@ public function lock($id,$group,$locktime)
/**
* Unlock cached item
*
- * @param string $id The cache data id
- * @param string $group The cache data group
+ * @param string $id The cache data id
+ * @param string $group The cache data group
*
* @return boolean True on success, false otherwise.
* @since 11.1
@@ -264,8 +281,8 @@ public function unlock($id, $group = null)
/**
* Get a cache_id string from an id/group pair
*
- * @param string $id The cache data id
- * @param string $group The cache data group
+ * @param string $id The cache data id
+ * @param string $group The cache data group
*
* @return string The cache_id string
* @since 11.1
@@ -301,4 +318,4 @@ public static function addIncludePath($path='')
return $paths;
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.