LiteSpeed Cache extension for TYPO3.
$ composer require atomicptr/lscache
Put this inside your .htaccess
<IfModule LiteSpeed>
CacheLookup public on
</IfModule>
This extension has a few slots you can connect to:
<?php
// ...
class CacheResponseHeaderSlot {
public function handle(LscacheService $lscacheService) {
$lscacheService->headers = []; // remove headers
}
}
<?php
// ...
class CacheTagsSlot {
public function handle(TypoScriptFrontendController $tsfe, LscacheService $lscacheService) {
$lscacheService->cacheTags[] = "my_fancy_cachetag";
}
}
<?php
// ...
class CacheVariationsSlot {
public function handle(TypoScriptFrontendController $tsfe, LscacheService $lscacheService) {
$lscacheService->cacheVariations[] = "cookie=my_variation_cookie";
}
}
<?php
// ...
class BeforePurgeSlot {
public function handle(string $purgeIdentifier, LscacheService $lscacheService) {
if ($purgeIdentifier === "*") {
// Don't allow to purge everything (for some reason)
$lscacheService->canPurge = false;
}
}
}
MPL v2