KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/performancepartsinc/main/libraries/pattemplate/patTemplate/TemplateCache/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/performancepartsinc/main/libraries/pattemplate/patTemplate/TemplateCache/eAccelerator.php
<?PHP
/**
 * patTemplate Template cache that stores data in the eAccelerator Cache
 *
 * $Id: eAccelerator.php 10381 2008-06-01 03:35:53Z pasamio $
 *
 * @package		patTemplate
 * @subpackage	Caches
 * @author		Mike Valstar <[email protected]>
 */

// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();

/**
 * patTemplate Template cache that stores data in the eAccelerator Cache
 *
 * If the lifetime is set to auto, the cache files will be kept until
 * you delete them manually.
 *
 * $Id: eAccelerator.php 10381 2008-06-01 03:35:53Z pasamio $
 *
 * @package		patTemplate
 * @subpackage	Caches
 * @author		Mike Valstar <[email protected]>
 */
class patTemplate_TemplateCache_eAccelerator extends patTemplate_TemplateCache
{
	/**
	* parameters of the cache
	*
	* @access	private
	* @var		array
	*/
	var $_params = array( 'lifetime' => 'auto');

	/**
	* load template from cache
	*
	* @access   public
	* @param	string			cache key
	* @param	integer			modification time of original template
	* @return   array|boolean	either an array containing the templates or false cache could not be loaded
	*/
	function load( $key, $modTime = -1 )
	{
		if (!function_exists('eaccelerator_lock')) {
			return false;
		}
		$something = eaccelerator_get($key);
		if (is_null($something)){
			return false;
		}else{
			return unserialize($something);
		}
	}

	/**
	* write template to cache
	*
	* @access   public
	* @param	string		cache key
	* @param	array		templates to store
	* @return   boolean		true on success
	*/
	function write( $key, $templates )
	{
		if (!function_exists('eaccelerator_lock')) {
			return false;
		}

		eaccelerator_lock($key);
		if ($this->getParam( 'lifetime' ) == 'auto'){
			 eaccelerator_put($key, serialize( $templates ));
		}else{
			eaccelerator_put($key, serialize( $templates ), $this->getParam( 'lifetime' ) * 60);
		}
		 eaccelerator_unlock($key);

		 return true;
	}
}
?>

Anon7 - 2021