1👍
✅
It’s not the same thing at all, the {% cache %}
template tag allows to cache a template fragment and that’s used by the server, @vary_on_cookie
decorator sets the Vary response header to Cookie, and that’s used by the browser.
Also, you could do {% cache 500 sidebar request.user %}
instead of specifying the username.
👤jpic
Source:stackexchange.com