Cache RIT Images better
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 55/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- backend, performance
研究方向
從 packet/context_processors.py 的第 58-70 行開始,檢查 RIT 圖像查找周圍對 functools.lru_cache 的使用。刪除快取作為最小修正,然後驗證無需重新啟動 pods 即可顯示更新後的圖像;lazy frontend loading 是 issue 提到的一種可行替代方案,但不是必要的。
由索引模型根據 Issue 內容生成。
描述
This is a bad cache
https://github.com/ComputerScienceHouse/packet/blob/f61cd2b5b616e3b7f35fad95b515313ea2d50bcb/packet/context_processors.py#L58-L70
It caches the first call to this function for any given username (up to 256 of them) via functools.lru_cache, which is bad, because it kinda defeats the point of gravatar.
We could do some form of caching, but probably shouldn't. Loading these images lazily in the frontend would probably be much better.
At the very least, please remove the cache so we can stop kicking the pods to have photos update.
- 主要語言
- Python
- 星號
- 26
- 分支
- 33
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ComputerScienceHouse/packet 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 35/100
ComputerScienceHouse/packet#413 ·
-
難度 4/5 3-5 天 新手友好度 38/100
ComputerScienceHouse/packet#411 ·
-
難度 5/5 一週以上 新手友好度 30/100
ComputerScienceHouse/packet#408 ·
-
React Frontend?未關閉ux enhancement
難度 5/5 一週以上 新手友好度 25/100
ComputerScienceHouse/packet#404 ·
-
ux enhancement
難度 5/5 一週以上 新手友好度 25/100
ComputerScienceHouse/packet#403 ·
查看 ComputerScienceHouse/packet 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 65/100
521xueweihan/HelloGitHub#4025 ·
-
難度 2/5 1-3 小時 新手友好度 85/100
aws-samples/sample-per-model-bedrock#321 ·
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 68/100
FavioVazquez/showtime#101 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
koush/ha_scrypted#81 ·
-
難度 2/5 1-3 小時 新手友好度 82/100
google/osv-scanner-action#147 ·