Skip to content

Commit

Permalink
Merge pull request #6 from dlubitz/bugfix/lifetime-visualisation
Browse files Browse the repository at this point in the history
Fix lifetime visualisation
  • Loading branch information
dlubitz authored Jun 26, 2017
2 parents 5f07d2a + 0cc454c commit c4dc3e1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Classes/Aspects/ContentCacheVisualisationAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ public function wrapContentCacheCachedSegment(JoinPointInterface $joinPoint)
{
$content = $joinPoint->getMethodArgument('content');
$path = $joinPoint->getMethodArgument('typoScriptPath');
$lifetime = $joinPoint->getMethodArgument('lifetime') ? (new \DateTime)->setTimestamp($joinPoint->getMethodArgument('lifetime'))
->format('U = c') : 'null';

$lifetime = null;
if ($joinPoint->getMethodArgument('lifetime')) {
$lifetime = (new \DateTime)->modify(
sprintf('+%d seconds',$joinPoint->getMethodArgument('lifetime'))
)->format('U = c');
}

if (!$this->_checkBlacklistedPath($path)) {
$parameter = [
Expand Down

0 comments on commit c4dc3e1

Please sign in to comment.