aimeos / aimeos-typo3

TYPO3 e-commerce extension for ultra fast online shops, scalable marketplaces, complex B2B applications and #gigacommerce
https://aimeos.org/TYPO3
GNU General Public License v3.0
274 stars 738 forks source link

Take the page type into account for caching - Part 1 #173

Closed guelzow closed 3 years ago

guelzow commented 3 years ago

Hi everyone.

Please review, test and comment. 😃

We retrieve the page type via the global request object, if available. This object is used all over the TYPO3 core, so I guess this is OK'ish.

Tobi

aimeos commented 3 years ago

After thinking about this for a while, there may be a better alternative esp. because the config array passed to the cache adapter is deprecated as you've already noticed.

The getBody() and getHeader() methods accept a parameter to distinguish different plugin instances and this could be used for the types as well: https://github.com/aimeos/aimeos-typo3/blob/master/Classes/Controller/AbstractController.php#L164-L166 e.g.:

return $client->getBody( $pageType );
aimeos commented 3 years ago

Thanks a lot

guelzow commented 3 years ago

Thanks for the patience (and the review). Took me a while to start the pull request.