Django Caching and Browser Caching

18 views
Skip to first unread message

yingi keme

unread,
Apr 8, 2018, 10:49:07 AM4/8/18
to Django users
I Have set up cache in my File System and I have used the following code to cache my view

from django.views.decorators.cache import cache_page

@cache_page(60 * 15)
def myView(request):
    #some code


What i want to know is that, How is this caching mechanism different from the automatic caching some browsers provide?

Browsers usually do cache web apps, so what difference will this manual caching configuration make?

Jason

unread,
Apr 8, 2018, 11:19:25 AM4/8/18
to Django users
Browsers cache images, js and css, but not the actual data that's rendered.  In addition, browser caching only works for repeat visitors to your site.  Using server side caching complements browser side caching but also works for first time visitors.

yingi keme

unread,
Apr 8, 2018, 3:08:23 PM4/8/18
to django...@googlegroups.com
Thanks Jason

Yingi Kem
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9787aa43-5b35-446d-85a1-4609c6b38c5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages