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 ·