CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #3566

cacheTimeOut is sometimes 0

Added by Christoph Mayer about 4 years ago. Updated over 2 years ago.

Status:Resolved Start date:2009-06-04
Priority:Should have Due date:
Assignee:Daniel Poetzinger % Done:

100%

Category:-
Target version:-
Votes: 0

Description

Hello,

$this->cacheTimeOut (class.tx_aoerealurlpath_cachemgmt.php) is always 0 for current page. And for some reasons I dont know, $this->cacheTimeOut is also 0 for some other pages (no recognizable pattern).
So the url cache of these sites will be renewed with every click.

For testing I put an echo into function isInCache


function isInCache ($pid)
{
    $row=$this->getCacheRowForPid($pid);
    if (! is_array($row)) {
            return false;
    } else {
        if ($this->_isCacheRowStillValid($row)) {
            return $row['path'];
        }
        else {
            echo $row['path'] . '<br />';
            return false;
        }
    }
}

really quick & very dirty fix :-) :


function _isCacheRowStillValid($row) {

    // CHRISTOPH edit here
    $confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['aoe_realurlpath']);
    $this->setCacheTimeOut($confArr['defaultCacheTimeOut']);
    // edit end

    if ($row['dirty'] ==1) {
        return false;
        }
        elseif (($row['tstamp'] + $this->cacheTimeOut) < time()) {
                return false;
        } 
        else {
            return true;
        }
}

aoe_realurlpath - 0.1.16
TYPO3 - 4.2.6
PHP - 5.2.0

Associated revisions

Revision 27351
Added by Bernd Schönbach over 3 years ago

[Bug 3566] Add a checkbox in the flexforms for the "previous/next element" buttons,r=oliver

History

Updated by Daniel Poetzinger about 4 years ago

  • Status changed from New to Needs Feedback

What is your configuration?

I think this happens if the page is opened with a diffrent domain - and the real-url configuration for that domain is wrong or diffrent

can you check this?

Greetings

Daniel

Updated by Christoph Mayer about 4 years ago

The website is only available at one domain - here is my real_url conf (shortened).

Perhaps it happends because of USER_INT content elements?

<?php
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
    'init' => array(
        'doNotRawUrlEncodeParameterNames' => 1,
        'appendMissingSlash' => 'ifNotFile',
        'enableUrlDecodeCache' => 0,
        'enableUrlEncodeCache' => 0,
        'enableCHashCache' => 1,
    ),
    'preVars' => array(
        array(
            'GETvar' => 'no_cache',
            'valueMap' => array(
                'nc' => 1,
            ),
            'noMatch' => 'bypass',
        ),
        array(
            'GETvar' => 'L',
            'valueMap' => array(
                'en' => '1',
            ),
            'noMatch' => 'bypass',
        ),
    ),
    'fileName' => array (
        'defaultToHTMLsuffixOnPrev' => true,
        'index' => array(
            'backend.php' => array(
                'keyValues' => array (
                    'type' => 100,
                )
            ),
            'print' => array(
                'keyValues' => array(
                    'type' => 98,
                )
            ),
        ),
    ),
    'postVarSets' => array(
        '_DEFAULT' => array(
        ),
    ),

    'pagePath' => array(
        'type' => 'user',
        #'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
        'userFunc' => 'EXT:aoe_realurlpath/class.tx_aoerealurlpath_pagepath.php:&tx_aoerealurlpath_pagepath->main',
        'segTitleFieldList'=>'alias,tx_aoerealurlpath_overridesegment,nav_title,title,subtitle',
        'rootpage_id' => 1,
        'spaceCharacter' => '-',
        'languageGetVar' => 'L',
        'disablePathCache' => false,
        'autoUpdatePathCache' => true,
        'expireDays' => 3
    ),
);

?>

Updated by Daniel Poetzinger over 3 years ago

  • Status changed from Needs Feedback to Resolved
  • % Done changed from 0 to 100

There is no " 'cacheTimeOut'=> 100 " set in the configuration for aoe_realurlpath.

So this is no error, just wrong configuration.

Also available in: Atom PDF