jeudi 11 février 2016

Storing queryset after fetching it once

I am new to django and web development. I am building a website with a considerable size of database. Large amount of data should be shown in many pages, and a lot of this data is repeated. I mean I need to show the same data in many pages. Is it a good idea to make a query to the database asking for the data in every GET request? it takes many seconds to get the data every time I refresh the page or request another page that has the same data shown. Is there a way to fetch the data once and store it somewhere and just display it in every page, and only refetch it when some updates are being done. I thought about the session but I found that it is limited to 5MB which is small for my data. Any suggestions?

Thank you.




Aucun commentaire:

Enregistrer un commentaire