PATH:
home
/
centosnipponia
/
public_html
/
nipponiacom2
/
caribe
/
libraries
/
regularlabs
/
helpers
<?php /** * @package Regular Labs Library * @version 16.7.10746 * * @author Peter van Westen <info@regularlabs.com> * @link http://www.regularlabs.com * @copyright Copyright © 2016 Regular Labs All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; class RLCache { static $cache = array(); static public function has($hash) { return isset(self::$cache[$hash]); } static public function get($hash) { if (!isset(self::$cache[$hash])) { return false; } return is_object(self::$cache[$hash]) ? clone self::$cache[$hash] : self::$cache[$hash]; } static public function set($hash, $data) { self::$cache[$hash] = $data; return $data; } static public function read($hash) { if (isset(self::$cache[$hash])) { return self::$cache[$hash]; } $cache = JFactory::getCache('regularlabs', 'output'); return $cache->get($hash); } static public function write($hash, $data, $ttl = 0) { self::$cache[$hash] = $data; $cache = JFactory::getCache('regularlabs', 'output'); if ($ttl) { // convert ttl to minutes $cache->setLifeTime($ttl * 60); } $cache->setCaching(true); $cache->store($data, $hash); self::set($hash, $data); return $data; } }
[+]
..
[-] assignment.php
[edit]
[+]
assignments
[-] assignments.php
[edit]
[-] cache.php
[edit]
[-] field.php
[edit]
[-] functions.php
[edit]
[-] groupfield.php
[edit]
[-] helper.php
[edit]
[-] html.php
[edit]
[-] htmlfix.php
[edit]
[-] licenses.php
[edit]
[-] parameters.php
[edit]
[-] protect.php
[edit]
[-] search.php
[edit]
[-] string.php
[edit]
[-] tags.php
[edit]
[-] text.php
[edit]
[-] versions.php
[edit]
[-] .htaccess.disabled
[edit]