Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Cache content ignored if no date present

オープン
#86 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

@DawnofGenX がすでに取り組んでいます。

2026年9月23日 から。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
backend

調査の方向性

cachecontrol/controller.py の 120 行目付近から始めて cached_response をたどり、ETag はあるものの Date ヘッダーがないレスポンスに注目してください。期待される処理を決める前に、RFC 7232 の関連する動作と既存のキャッシュテストを確認してください。キャッシュエントリの動作が回帰テストでカバーされ、合意したセマンティクスと一致すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

https://github.com/ionrock/cachecontrol/blob/master/cachecontrol/controller.py#L120 ff. seems to be ignoring cache entries that do not have a date header.

I think https://tools.ietf.org/html/rfc7232#section-2.4 allows sending etag without date; in that case, the cache content would never be used.

Also, I'm wondering why it's deleting a cache entry here; if a cache entry does not have the headers required to make it useful, wouldn't it be better to never enter it into the cache in the first place?
(I may be misunderstanding things, grossly; I'm currently looking only at the code that retrieves data from the cache, in cached_response.)

主要言語
Python
スター
505
フォーク
153
平均マージ
5日 6時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

psf/cachecontrol のほかの issue

psf/cachecontrol の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。