Clear Cache on Typo3 Neos

Currently there is no option in backend to clear cache.Instead we need to clear cache via command prompt.
There are two types of caches in Typo3 Neos.

1.Production Cache

To clear production cache use below command.

FLOW_CONTEXT=Production ./flow flow:cache:flush --force

2 Development Cache

To clear development cache use below command.

./flow flow:cache:flush --force

We have also command to clear particular cache
Example :

./flow flow:cache:flushone TYPO3_TypoScript_Content

Xclass to force the use of Additional Params in all content links

Suppose you want to add one extra parameter to typolink all over the website
Here is the steps to follow :
Step1:
Include below lines in ext_localconf.php of our extension
$GLOBALS[‘TYPO3_CONF_VARS’][‘SYS’][‘Objects’][‘TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer’] = array(
‘className’ => ‘VenderName\\ExtName\\Xclass\\ContentObjectRenderer’
);
// Also Xclass the old class name for compatibility issues (old extensions may create an instance of “tslib_cObj”)
$GLOBALS[‘TYPO3_CONF_VARS’][‘SYS’][‘Objects’][‘tslib_cObj’] = array(
‘className’ => ‘VenderName\\ExtName\\Xclass\\ContentObjectRenderer’
);

Step2:
Create File with name ContentObjectRenderer.php in Xclass Folder
<?
namespace Vendername\Extensionname\Xclass;

class ContentObjectRenderer extends \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer {

/**
* Adds customerview = 1 in url params
*/
function typoLink($linktxt, $conf) {
if($_GET[‘customerview’] == 1){
$conf[‘additionalParams’] = $conf[‘additionalParams’].’&customerview=1′;
}
$typolink = parent::typoLink($linktxt, $conf);
return $typolink;
}
}
?>

Step3:
Clear the cache and check whether xclass is included or not.
Finally reload the frontend page where all typolinks are added with custom parameter customerview

Extend Typo3 Function using Xclass in Extbase Extension

Here is the few steps on how to extend a function Using XCLASS

Step1:
Add Below code in ext_localconf.php

$GLOBALS[‘TYPO3_CONF_VARS’][‘SYS’][‘Objects’][‘tx_realurl’] = array(
‘className’ => ‘Vendername\\Extensionname\\Xclass\\Realurl’
);

Step2:
Finally Create File with name Realurl.php in Xclass Folder
<?php
namespace Vendername\Extensionname\Xclass;

class Realurl extends \tx_realurl {
public function encodeSpURL(&$params) {
// Do Your Stuff
devlog(‘ I am here.’);
parent::encodeSpURL($params);
}
}
?>

Step3:
Clear the cache and check whether xclass is included or not.

Thats it.