1

주제: cache 관련 질문입니다.

텍스트 큐브에서 캐쉬를 사용하게 되어 있는걸로 알고 있습니다.

제가 기본 플러그인인 MT_Cover_RecentPS_Default 를 살펴봤는데..

캐쉬 관련하여 다음과 같은 코드가 있더군요.

    $cache = new PageCache;
    $cache->name = 'MT_Cover_RecentPS';
    if($cache->load()) { //If successful loads
        // If coverpage is single mode OR coverpage is coverblog and cache is not expired, return cache contents.
        if($data['coverMode']==1 || ($data['coverMode']==2 && (Timestamp::getUNIXtime() - $cache->dbContents < 300))) {
            return $cache->contents;
        }    
    }

해당 코드를 보면..
$data['coverMode']==1 즉 단일사용자 모드일 경우에는
새로운 캐쉬를 생성하지 않고 저장된 캐쉬를 계속 넘겨주게 되어 있는 것 같은데요..

이렇게 될 경우 계속 똑같은 페이지만 나오지 않을까요?

제가 텍스트큐브의 캐쉬 시스템에 대해 잘 몰라서 묻습니다.
알려주세요 tongue

2

답글: cache 관련 질문입니다.

지적하신 부분이 맞는 것 같습니다.:lol:

888번 티켓으로 등록하였습니다^^

"Everything looks different on the other side."

-Ian Malcomm, from Michael Crichton's 'The Jurassic Park'

3

답글: cache 관련 질문입니다.

inureyes 님//

그런데 신기하게 업데이트가 잘 되거든요??

그건 왜 그럴까요?

제가 MT_Cover_RecentPS_Default 이걸 paging이 가능하게 살짝 고쳐 놓고.. 배포를 했는데.. 업데이트가 조금 불안정하다는 이야기가 있어서 묻습니다.
저는 cache 관련하여서는

단순하게 paging을 위해서

    $cache = new PageCache;
    if( $data['usePage'] == 1 )    // paging 관련 추가
        $cache->name = 'MT_Cover_RecentPS_Enhance'.$pageNum;
    else
        $cache->name = 'MT_Cover_RecentPS_Enhance';
    if($cache->load()) { //If successful loads
        // If coverpage is single mode OR coverpage is coverblog and cache is not expired, return cache contents.
        if($data['coverMode']==1 || ($data['coverMode']==2 && (Timestamp::getUNIXtime() - $cache->dbContents < 300))) {
            return $cache->contents;
        }    
    }

요렇게 cache name 뒤에 page를 붙이도록 수정한거 밖에 없거든요.^^