set() public static method

Since: 2.0
public static set ( string $key, mixed $value, integer $expires, string $cache_mode = null, string $group = '' ) : boolean | mixed | null | string | void
$key string Key for the cache
$value mixed Value to add to the cache
$expires integer (optional) Time in seconds for the cache to expire, if 0 no expiration.
$cache_mode string (optional) Decides the caching method to use for the view.
$group string (optional) Set the group of the value.
return boolean | mixed | null | string | void
Ejemplo n.º 1
0
/**
 * Set a cached value
 *
 * @see PodsView::set
 *
 * @param string $key Key for the cache
 * @param mixed $value Value to add to the cache
 * @param int $expires (optional) Time in seconds for the cache to expire, if 0 no expiration.
 * @param string $cache_mode (optional) Decides the caching method to use for the view.
 * @param string $group (optional) Key for the group
 *
 * @return bool|mixed|null|string|void
 *
 * @since 2.0
 */
function pods_view_set($key, $value, $expires = 0, $cache_mode = 'cache', $group = '')
{
    require_once PODS_DIR . 'classes/PodsView.php';
    return PodsView::set($key, $value, $expires, $cache_mode, $group);
}