kopia lustrzana https://github.com/wagtail/wagtail
frontend cache purge docs change
rodzic
e4a9756c79
commit
c9385ca1ce
|
@ -107,9 +107,11 @@ Purging individual URLs
|
|||
|
||||
``wagtail.contrib.wagtailfrontendcache.utils`` provides another utils function called ``purge_url_from_cache``. As the name suggests, this purges an individual URL from the cache.
|
||||
|
||||
For example, this could be useful for purging a single page of blogs:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from wagtail.contrib.wagtailfrontendcache.utils import purge_url_from_cache
|
||||
|
||||
# Purge the homepage
|
||||
purge_url_from_cache(homepage.full_url)
|
||||
# Purge the first page of the blog index
|
||||
purge_url_from_cache(blog_index.url + '?page=1')
|
||||
|
|
Ładowanie…
Reference in New Issue