Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    •  
      CommentAuthorfrancois
     
    Hi,

    when I use the Page Caching that's work fine until I try to access with many simultaneous connections. I'm using the "ab" apache tool to stress testing my app and see that the framework is instantiated when many connections are done.

    Here my index.php file

    <?php
    /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

    // +----------------------------------------------------------------------+
    // | Akelos Framework - http://www.akelos.org |
    // +----------------------------------------------------------------------+
    // | Copyright (c) 2002-2006, Akelos Media, S.L. & Bermi Ferrer Martinez |
    // | Released under the GNU Lesser General Public License, see LICENSE.txt|
    // +----------------------------------------------------------------------+

    /**
    * @author Bermi Ferrer <bermi a.t akelos c.om>
    * @copyright Copyright (c) 2002-2006, Akelos Media, S.L. http://www.akelos.org
    * @license GNU Lesser General Public License <http://www.gnu.org/copyleft/lesser.html>
    */

    /**
    * Public PHP file. This file will launch the framework
    */
    if(!defined('AK_CONFIG_INCLUDED')){
    if(!file_exists(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php')){
    define('AK_ENVIRONMENT', 'setup');
    error_reporting(E_ALL);
    @ini_set('display_errors', 1);
    require(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.
    'app'.DIRECTORY_SEPARATOR.'controllers'.DIRECTORY_SEPARATOR.'framework_setup_controller.php');
    exit;
    }else{
    include_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
    }
    }

    /**
    * Check cache here, render cache with headers
    */
    $cache_settings = @include AK_CONFIG_DIR.DS.'cache'.DS.AK_ENVIRONMENT.DS.'caching.php';
    if ($cache_settings!=false && $cache_settings['enabled']) {
    require(AK_LIB_DIR . DS . 'AkActionController'.DS.'AkCacheHandler.php');
    $null = null;
    $pageCache = new AkCacheHandler();
    $pageCache->log('before init');
    $pageCache->init($null,$cache_settings);
    $pageCache->log('before getCachedPage');
    $cachedPage = $pageCache->getCachedPage();
    if ($cachedPage !=false) {
    $pageCache->log('Is cached');
    global $sendHeaders, $returnHeaders, $exit;
    $sendHeaders = true;
    $returnHeaders = false;
    $exit = true;
    include $cachedPage;
    $pageCache->log('After Is cached');
    }
    }
    require_once(AK_LIB_DIR . DS . 'AkDispatcher.php');
    $Dispatcher =& new AkDispatcher();
    $Dispatcher->dispatch();

    $pageCache->log('End Batch');
    ?>

    The function getCachedPage() return always false but I know that the page has been cached (tested with only one access). I have the same result using either memcache or cache_lite

    Has anybody encountered this problem before and how to fix it ?

    Thxs
    • CommentAuthorarnoschn
     
    Hi francois,

    svn info

    of the akelos lib dir please to know which version you are on.

    Arno
    •  
      CommentAuthorfrancois
     
    Hi Arno,

    I'm using the trunk revision 1309

    Francois
    •  
      CommentAuthorfrancois
     
    Other information, I'm using define('AK_PUBLIC_LOCALES', 'pt_br')

    I saw that the CacheHandler set by default the 'en' conf for locales and return a wrong path for the cached page. May be a problem when the handler try to set the default config local.

    Francois