Django Caching for Authenticated Users Only

前端 未结 4 1977
走了就别回头了
走了就别回头了 2020-12-24 07:34

Question

In Django, how can create a single cached version of a page (same for all users) that\'s only visible to authenticated users?

Setup

The pag

4条回答
  •  一个人的身影
    2020-12-24 08:15

    I know this is a very old question, but we have a new alternative to solve this.

    You can use the decorator cache_control passing private as True to protect your data.

提交回复
热议问题