diff --git a/README.rst b/README.rst index d86e08c..636cba9 100644 --- a/README.rst +++ b/README.rst @@ -251,9 +251,9 @@ caching the schema view in-memory, with some sane defaults: * caching is enabled by the `cache_page `__ decorator, using the default Django cache backend, can be changed using the ``cache_kwargs`` argument * HTTP caching of the response is blocked to avoid confusing situations caused by being shown stale schemas -* if `public` is set to ``False`` on the SchemaView, the cached schema varies on the ``Cookie`` and ``Authorization`` - HTTP headers to enable filtering of visible endpoints according to the authentication credentials of each user; note - that this means that every user accessing the schema will have a separate schema cached in memory. +* the cached schema varies on the ``Cookie`` and ``Authorization`` HTTP headers to enable filtering of visible endpoints + according to the authentication credentials of each user; note that this means that every user accessing the schema + will have a separate schema cached in memory. 4. Validation ============= diff --git a/src/drf_yasg/views.py b/src/drf_yasg/views.py index b05a54a..d71290b 100644 --- a/src/drf_yasg/views.py +++ b/src/drf_yasg/views.py @@ -94,8 +94,7 @@ def get_schema_view(info=None, url=None, patterns=None, urlconf=None, public=Fal Arguments described in :meth:`.as_cached_view`. """ - if not cls.public: - view = vary_on_headers('Cookie', 'Authorization')(view) + view = vary_on_headers('Cookie', 'Authorization')(view) view = cache_page(cache_timeout, **cache_kwargs)(view) view = deferred_never_cache(view) # disable in-browser caching return view