atomicptr/lscache

此包已被废弃,不再维护。未建议替代包。
此包最新版本(v1.2.0)的许可信息不可用。

LiteSpeed Cache 扩展程序用于 TYPO3。

安装: 3

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:typo3-cms-extension

v1.2.0 2019-09-02 13:50 UTC

This package is auto-updated.

Last update: 2022-04-05 17:57:35 UTC


README

LiteSpeed Cache 扩展程序用于 TYPO3。

通过 composer 安装

$ composer require atomicptr/lscache

配置

将以下内容放入您的 .htaccess 文件中

<IfModule LiteSpeed>
  CacheLookup public on
</IfModule>

信号 & 插槽

此扩展程序有几个插槽可以连接

类:\Atomicptr\Lscache\Service\LscacheService

cacheResponseHeaders

<?php
// ...
class CacheResponseHeaderSlot {
    public function handle(LscacheService $lscacheService) {
        $lscacheService->headers = []; // remove headers
    }
}

cacheTags

<?php
// ...
class CacheTagsSlot {
    public function handle(TypoScriptFrontendController $tsfe, LscacheService $lscacheService) {
        $lscacheService->cacheTags[] = "my_fancy_cachetag";
    }
}

cacheVariations

<?php
// ...
class CacheVariationsSlot {
    public function handle(TypoScriptFrontendController $tsfe, LscacheService $lscacheService) {
        $lscacheService->cacheVariations[] = "cookie=my_variation_cookie";
    }
}

beforePurge

<?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