Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Los assets de CSS/JS tienen cache de 1 hora #78

Open
vfonic opened this issue Nov 3, 2024 · 2 comments
Open

Los assets de CSS/JS tienen cache de 1 hora #78

vfonic opened this issue Nov 3, 2024 · 2 comments

Comments

@vfonic
Copy link
Collaborator

vfonic commented Nov 3, 2024

Deberíamos tener la configuración para borrar el cache inmediatamente cuando se haga un nuevo deployment con cambios en los archivos de CSS/JS.

Si no, estaremos sirviendo nuevo HTML y viejo CSS/JS hasta que el cache expire.

La recomendación de usar S3 es un mal consejo acá:
https://docs.djangoproject.com/en/4.2/howto/static-files/deployment/#serving-static-files-from-a-cloud-service-or-cdn
Siempre deberíamos usar CDN si es posible.

Usar S3 para cargar directamente CSS/JS y otros archivos:

  1. No es una buena idea (por el tema de seguridad)
  2. Slow https://www.google.com/search?q=s3+for+css+js+loading+slow
@rasca
Copy link
Member

rasca commented Nov 3, 2024

Estamos usando esta app para servir los static files: https://github.com/etianen/django-s3-storage

@vfonic
Copy link
Collaborator Author

vfonic commented Nov 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants