定制 andersundsehr/cache-automation 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

andersundsehr/cache-automation

Composer 安装命令:

composer require andersundsehr/cache-automation

包简介

Automatically Adds Cache Tags and cache lifetime

README 文档

README

TYPO3 has a good cache system, that is capable of removing the right caches at the right time. But it needs your help to do so.

usually you have to add Cache Tags to your code, to tell TYPO3 which tables were used in your code.

With this extension this Process is automated.

Installation

composer require andersundsehr/cache-automation

Currently only Compatible with TYPO3 11 LTS (doctrine dbal 2.13)

How this works in detail

This extension hooks into the TYPO3 QueryBuilder.
It manipulates the Query to get all the necessary information, to provide the best cache lifetime. The starttime condition is removed in the SQL Query, so we can get the lowest starttime that is still in the future. The endtime is also used for the cache lifetime. It is capable of handling complex queries, with multiple joins.

It also hooks into the Result Object, to intercept the result and add the Cache Tags to the Page Cache. The DocrineResult filters out the rows that have a starttime in the future, so the rows returned are the same as if the starttime condition was still in the query.

conditional fields

A conditional field is a field that is used in a WHERE condition of any Query.
It can be useful to add the field to the cache tag, so the cache is cleared if the field changes.

TODO:

  • read only mode for Metrics (aus vector extraction in eine extra Extension)
    • VECTOR \AUS\AusProject\Utility\MetricsCollectorUtility::collect
    • VECTOR \AUS\AusProject\Command\MetricsCommand::execute
  • add cache clear for file operations (replace file, delete file ...) sys_file_
  • SubQueries: at least we could create the <tablename>-<fieldname> cache tags for the subQuery.
  • Option for: disable <tablename>-<fieldname> handling
  • Option for: disable remove of StartTimeRestriction
  • add github actions
  • add TYPO3 12 and 13 compatibility

Limitations of that Process

  • Only works with the \TYPO3\CMS\Core\Database\Query\QueryBuilder (not with getConcreteQueryBuilder() \Doctrine\DBAL\Query\QueryBuilder)
    • indirectly it works with Extbases \TYPO3\CMS\Extbase\Persistence\Generic\Query because that uses the \TYPO3\CMS\Core\Database\Query\QueryBuilder.
    • indirectly it works with Doctrine\DBAL\Query\QueryBuilder because that uses the \TYPO3\CMS\Core\Database\Query\QueryBuilder.
  • it does not work if you let out the uid of the table. (eg. SELECT COUNT(*) FROM ...) (Connection->count() uses that.)
  • it does not know if the row you get from the database is really necessary for the cache tag.
  • it creates way more cache tags than the Core, that could lead to overflows in the Database.
  • it does not work with other Caches than the Page Cache.
    • maybe this can be added in the future, if there is a need for it.

between the Normal TYPO3 Cache handling and the Clear all caches on every Change,
it Tries to be as close as possible at the Point there it always clears enough caches, but as little as possible.

with ♥️ from anders und sehr GmbH

If something did not work 😮
or you appreciate this Extension 🥰 let us know.

We are hiring https://www.andersundsehr.com/karriere/

andersundsehr/cache-automation 适用场景与选型建议

andersundsehr/cache-automation 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 03 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 andersundsehr/cache-automation 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 andersundsehr/cache-automation 我们能提供哪些服务?
定制开发 / 二次开发

基于 andersundsehr/cache-automation 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2024-03-21