• 13-03-2009, 10:51:53
    #1
    merhaba arkadaşlar,
    kullandıgım dosya tabanlı cache sisteminde yeniden cacheleme süresi geldiginde sayfaları yenilemiyor.

    Sizce sorun nerede?

    $cachesystem = 'yes';
    $rootpath='./';
    $cache = 'cache';
    //---------------------------------
    //---- CACHE MOD v0.4 by xam
    //---------------------------------
    function cache_check ($file = 'cachefile') {
        global $cache,$rootpath,$cachesystem;    
        if ($cachesystem == 'yes') {
            $cachefile = $rootpath.$cache . '/'.$file.'.html';
            $cachetime = 2400 * 60; // 20 Hours     
            $updatetime = $cachetime / 60 / 60;
            if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile))
            {
                include_once($cachefile);
    //            print("<p align=center><font class=small color=red><b>This content was last cached on ".date('Y-m-d H:i:s', filemtime($cachefile))." and updating every ".$updatetime." hours.</b></font></p>");
                exit;
            }
            ob_start();
        }else
            return;
    }
      
    function cache_save  ($file = 'cachefile') {
        global $cache,$rootpath,$cachesystem;
        if ($cachesystem == 'yes') {
            $cachefile = $rootpath.$cache . '/'.$file.'.html';
            $fp = fopen($cachefile, 'w');
            fwrite($fp, ob_get_contents());      
            fclose($fp);        
            ob_end_flush();
        }else
            return;
    }
    //---------------------------------
    //---- CACHE MOD v0.4 by xam
    //---------------------------------
  • 13-03-2009, 11:08:50
    #2
    Üyeliği durduruldu
    durduk yeremi bozuldu yoksa yeni eklemeye mi calisiyorsunuz?
  • 13-03-2009, 20:31:12
    #3
    Cache klasörünün chmod değerinin 777 olduğundan emin ol.
    Dosyayı açamıyordur belki.
    Bir de araya ufak tefek kodlar onaylama kodları yaz çıktı ver. Kod nerede kırılıyor çıktı ile bakmaya çalış.
  • 14-03-2009, 09:05:52
    #4
    Arkadaşlar cache süresinde yenilenmiyor diyorum.

    777 olmasa hiç cache yapmaz
  • 14-03-2009, 10:39:50
    #5
    Üyeliği durduruldu
    nurettin adlı üyeden alıntı: mesajı görüntüle
    Arkadaşlar cache süresinde yenilenmiyor diyorum.
    777 olmasa hiç cache yapmaz
    iyi diyorsunuzda hata ayıklama yapmanız lazım üstadim burdan bakınca hiç bir hata görünmüyor