Ejemplo n.º 1
0
    function config_radio()
    {
        if (!function_exists('apc_store')) {
            ?>
			<input type="radio" disabled>APC - It seems like your server does not support the Alternative PHP Cache (APC). This is an advanced caching method which provides better performance than using the file system directly. This software can take advantage of APC if it is installed on the server. If you need this option, please contact your hosting administrator or see http://php.net/manual/en/book.apc.php.<br>
			<?php 
        } else {
            parent::config_radio();
        }
    }
Ejemplo n.º 2
0
 function JBCacheFiles()
 {
     parent::JBCacheDriver();
     if (function_exists('JB_get_cache_dir')) {
         $this->cache_dir = JB_get_cache_dir();
     } else {
         $dir = dirname(__FILE__);
         $dir = explode(DIRECTORY_SEPARATOR, $dir);
         $blank = array_pop($dir);
         $blank = array_pop($dir);
         $blank = array_pop($dir);
         $dir = implode('/', $dir);
         $this->cache_dir = $dir . '/' . 'cache' . '/';
     }
     $this->file_prefix = 'jb_cache_';
 }
Ejemplo n.º 3
0
function JB_cache_add($key, &$data, $expire = false)
{
    if (JB_CACHE_ENABLED == 'NO') {
        return;
    }
    $Cache = JBCacheDriver::get_driver();
    return $Cache->add($key, $data, $expire);
}
Ejemplo n.º 4
0
    function config_radio()
    {
        if (!class_exists('Memcache')) {
            ?>
			<input type="radio" disabled>Memcache - It seems like your server does not support Memcache. This caching method is best suited for sites which are load balanced across multiple servers. This software can take advantage of Memcache if it is installed on the server.<br>
			<?php 
        } else {
            parent::config_radio();
            // the following additional options
            // are saved in admin/edit_config.php
            ?>
			<p style="margin-left:15px">
			Additional Options for memcached:<br>
			Host: <input type="text" name="jb_memcache_host" size="29" value="<?php 
            echo JB_MEMCACHE_HOST;
            ?>
"><br>
			Port: <input type="text" name="jb_memcache_port" size="29" value="<?php 
            echo JB_MEMCACHE_PORT;
            ?>
"><br>
			<input type="checkbox" name="jb_memcache_compressed" value="YES" <?php 
            if (JB_MEMCACHE_COMPRESSED == 'YES') {
                echo ' checked ';
            }
            ?>
> Use Compression<br>
			</p>
		<?php 
            ?>

			<?php 
        }
    }