ComputerScienceHouse / ComputerScienceHouse/packet

Cache RIT Images better

Abierto
#292 0 comentarios 0 reacciones 0 asignados Ver en GitHub
good first issue javascript python
Lenguaje dominante
Python
Estrellas
25
Forks
33
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.