Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Caching on Django

I have a friend and he's developing a prototype website off his laptop. It's a cool site, very data driven and does some cool stuff on the fly. Problem is, it takes like 10 seconds to load on his local machine.

Is there a way he can cache the results of the queries? There are probably only a few thousand potential queries that need to be made and the resultant data won't change.

Google gave me nothing, so I turn to humans. Any ideas?

like image 234
Phil Salesses Avatar asked Dec 07 '25 06:12

Phil Salesses


2 Answers

Maybe johnny-cache?

Also, please look at this article, it covers Django QuerySet caching, and it’s really detailed.

like image 89
Arseny Avatar answered Dec 09 '25 21:12

Arseny


? django can cache queries : http://docs.djangoproject.com/en/dev/topics/cache/#the-low-level-cache-api

like image 31
marks34 Avatar answered Dec 09 '25 20:12

marks34