Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
60d2dde2
Kaydet (Commit)
60d2dde2
authored
Mar 24, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #22247 -- Replaced "upstream" with "downstream" in cache docs.
Thanks valgarv at gmx.net for the report.
üst
eed7e1d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
cache.txt
docs/topics/cache.txt
+10
-10
No files found.
docs/topics/cache.txt
Dosyayı görüntüle @
60d2dde2
...
...
@@ -34,7 +34,7 @@ offers different levels of cache granularity: You can cache the output of
specific views, you can cache only the pieces that are difficult to produce,
or you can cache your entire site.
Django also works well with "
up
stream" caches, such as `Squid
Django also works well with "
down
stream" caches, such as `Squid
<http://www.squid-cache.org>`_ and browser-based caches. These are the types of
caches that you don't directly control but to which you can provide hints (via
HTTP headers) about which parts of your site should be cached, and how.
...
...
@@ -1002,15 +1002,15 @@ instance, to do this for the ``locmem`` backend, put this code in a module::
...and use the dotted Python path to this class in the
:setting:`BACKEND <CACHES-BACKEND>` portion of your :setting:`CACHES` setting.
Up
stream caches
===============
Down
stream caches
===============
==
So far, this document has focused on caching your *own* data. But another type
of caching is relevant to Web development, too: caching performed by
"upstream"
caches. These are systems that cache pages for users even before the request
reaches your Web site.
of caching is relevant to Web development, too: caching performed by
"downstream" caches. These are systems that cache pages for users even before
the request
reaches your Web site.
Here are a few examples of
up
stream caches:
Here are a few examples of
down
stream caches:
* Your ISP may cache certain pages, so if you requested a page from
http://example.com/, your ISP would send you the page without having to
...
...
@@ -1028,7 +1028,7 @@ Here are a few examples of upstream caches:
subsequent requests to that page, without even contacting the Web page
again to see whether it has changed.
Up
stream caching is a nice efficiency boost, but there's a danger to it:
Down
stream caching is a nice efficiency boost, but there's a danger to it:
Many Web pages' contents differ based on authentication and a host of other
variables, and cache systems that blindly save pages based purely on URLs could
expose incorrect or sensitive data to subsequent visitors to those pages.
...
...
@@ -1040,7 +1040,7 @@ their user-specific inbox page cached for subsequent visitors to the site.
That's not cool.
Fortunately, HTTP provides a solution to this problem. A number of HTTP headers
exist to instruct
up
stream caches to differ their cache contents depending on
exist to instruct
down
stream caches to differ their cache contents depending on
designated variables, and to tell caching mechanisms not to cache particular
pages. We'll look at some of these headers in the sections that follow.
...
...
@@ -1092,7 +1092,7 @@ You can pass multiple headers to ``vary_on_headers()``::
def my_view(request):
# ...
This tells
up
stream caches to vary on *both*, which means each combination of
This tells
down
stream caches to vary on *both*, which means each combination of
user-agent and cookie will get its own cache value. For example, a request with
the user-agent ``Mozilla`` and the cookie value ``foo=bar`` will be considered
different from a request with the user-agent ``Mozilla`` and the cookie value
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment