Issue Task Closed

#39295Wrong expires date in cf_cache_pagesection

Johannes Hahn 07/26/12, 15:24 updated 10/23/17, 21:48

Description

Hi,
don’t know if its really a bug or just a miss configuration.

In table “cf_cache_pagesection” every expires timestamp is set to + 1 hour after
page generation. My config.cache_period = 86400 is ignored. So After one hour
the page cache is flushed.

In class t3lib_TStemplate function start near line 337
i changed if from:

$pageSectionCache->set(
  intval($GLOBALS['TSFE']->id) . '_' . $mpvarHash,
  $cc,
  array(
    'pageId_' . intval($GLOBALS['TSFE']->id),
    'mpvarHash_' . $mpvarHash
  )

to

$pageSectionCache->set(
  intval($GLOBALS['TSFE']->id) . '_' . $mpvarHash,
  $cc,
  array(
    'pageId_' . intval($GLOBALS['TSFE']->id),
    'mpvarHash_' . $mpvarHash
  ),
  //set timout else default 3600 is used
  $GLOBALS['TSFE']->get_cache_timeout()

then the expires date is correct.

Reviews 2