Removing specific items from Django's cache?

后端 未结 2 1794
既然无缘
既然无缘 2021-02-03 12:21

I\'m using site wide caching with memcached as the backend. I would like to invalidate pages in the cache when the underlying database object changes.

If the page name

2条回答
  •  情深已故
    2021-02-03 12:43

    tghw's solution does not actually work, because the cache key is NOT the absolute path. The key is calculated from the absolute path and the HTTP headers. See this question for an example.

提交回复
热议问题