ssch/typo3-psr-cache-adapter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ssch/typo3-psr-cache-adapter

最新稳定版本:v2.0.1

Composer 安装命令:

composer require ssch/typo3-psr-cache-adapter

包简介

Provide Adapters for TYPO3 to be compatible with PSR-6

README 文档

README

Provide a PSR-6 and PSR-16 compatible cache adapter for the TYPO3 Caching Framework.

Usage

To ease the creation of a PSR-6 or PSR-16 compatible cache object the extension ships with two factories. One for PSR-6 and one for PSR-16.
Create either a PSR-6 or a PSR-16 compatible cache object with leveraging Symfony DI configuration:

use Psr\Cache\CacheItemPoolInterface;
use Ssch\Cache\Factory\Psr6Factory;
use MyNamespace\MyExtensionKey\Service\MyService;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use function Symfony\Component\DependencyInjection\Loader\Configurator\service;

return static function (ContainerConfigurator $containerConfigurator): void {
    $services = $containerConfigurator->services();
    $services->defaults()
        ->autowire()
        ->private()
        ->autoconfigure();

    $services->set('cache.psr6.typo3_psr_cache_adapter_test', CacheItemPoolInterface::class)
        ->factory([service(Psr6Factory::class), 'create'])
        ->args(['typo3_psr_cache_adapter_test']);
    $services->set(MyService::class)
        ->args([service('cache.psr6.typo3_psr_cache_adapter_test')]);
};

Note the typo3_psr_cache_adapter_test. This is the cache identifier you have used to configure your TYPO3 Cache for the TYPO3 Caching Framework.

统计信息

  • 总下载量: 29.33k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-22