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

    Is there any method of page caching in akelos I try to find but no luck also I tried the rails way "var $caches_page = array('listing');" but this also don't work

    Sorry for my English please help

    Thanks

    • CommentAuthorspykid
     

    Me and my server both is under critical load please help me out I will be great full

    Thanks

    • CommentAuthorinsanet
     

    there was a post here explaining that. i cant find it.

    anyways this value caching maybe can help you.

              // define AK_CACHE_HANDLER in config.php
               define ('AK_CACHE_HANDLER', 1);
    

        include_once(AK_LIB_DIR.'/AkCache.php');
        $Cache =& new AkCache();
        $seconds = 3600; 
        $cache_id = '_expensive';
        $Cache->init($seconds,1);
        if (!$tree = $Cache->get($cache_id)) {
                            //high demanding code here
                            $tree = expensive_function();
        $Cache->save($tree);
        }
    

    i have used this and i can confirm you that this works.

    • CommentAuthorinsanet
     

    i found the documentation at least.

     class WeblogController extends ActionController {
    
     var $caches_page = array('show','new');
      function show() {
       ....
     }
    
     function new() {
      .... 
     }
     }
    

    here is the link: http://www.akelos.org/xref/nav.html?AkActionController/AkCacheHandler.php.html

    i havent tested this by the way.

    and maybe this can be useful too: http://forum.akelos.org/discussion/143/slow-findbysql/