Cache contracts: numeric keys in getMultiple() and a TTL of zero or less
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- php
调研方向
先阅读 v3.0/packages/cache/contracts.md 的批量方法部分和 v3.0/packages/cache/adapters.md 的 Memcached 部分,然后对照 3.2.x 代码检查每项说法:getMultiple() 的实现以及内置适配器的 TTL 处理(参见 #691 和 #692)。编写 issue 指定的三句话,记住数组键行为来自 PHP 本身,并提交到 staging 分支而不是已发布的文档。完成意味着 contracts.md 涵盖 getMultiple() 结果中的整数键以及 TTL 为零或已过期时的移除规则,并且 adapters.md 说明超过 30 天的 TTL 在 Memcached 上可用。
由索引模型根据 Issue 内容生成。
描述
Summary
Two cache behaviours from framework 3.2.0 are not described in v3.0/packages/cache/contracts.md yet.
Changes
- Batch contract: numeric keys in the result of
getMultiple(). The page says the batch methods "turn integer keys back into strings, so numeric keys work as expected". It does not say that the arraygetMultiple()returns has them as integer keys again:getMultiple(['42'])returns[42 => …], because PHP turns a numeric string array key into an integer. Add one sentence, so code that reads the keys does not expect strings. - TTL contract: a TTL of zero or less. Add that a TTL of
0or less, and aDateIntervalin the past, removes the item, as PSR-16 requires, in every built-in adapter. Memcached kept such an item until 3.2.0 (quantum-php/framework#692). - Memcached adapter (
v3.0/packages/cache/adapters.md): one sentence that a TTL of more than 30 days works; before 3.2.0, Memcached read it as a Unix timestamp and the item expired at once (quantum-php/framework#692).
Every statement is checked against the 3.2.x code. The changes wait in staging until 3.2.0 is released.
Related
- quantum-php/framework#691 (the
getMultiple()return type), #692 (Memcached TTL)
- 主要语言
- 没有语言数据
- 星标
- 3
- 派生
- 1
- 平均合并
- 2 分钟
- 30 天内合并 PR
- 27
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
quantum-php/docs 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 73/100
quantum-php/docs#196 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 84/100
quantum-php/docs#190 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 75/100
quantum-php/docs#194 ·
维护者通常 1 天内回复
-
documentation
难度 3/5 1-2 天 新手友好度 63/100
quantum-php/docs#192 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 48/100
quantum-php/docs#185 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 73/100
google/elephant-goldfish-model#586 ·
维护者通常 2 天内回复
-
documentation Entwickler
难度 1/5 1 小时以内 新手友好度 89/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
memtomem/memtomem-stm#1657 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 1/5 1 小时以内 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 68/100
lightninglabs/layertree#28 ·