ComputerScienceHouse / ComputerScienceHouse/packet

Cache RIT Images better

オープン
#292 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
good first issue javascript python
主要言語
Python
スター
25
フォーク
33
PR マージ指標
30日以内にマージされた PR はありません

説明

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`](https://docs.python.org/3/library/functools.html#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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

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

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