diff --git a/openstack_dashboard/dashboards/project/access_and_security/keypairs/views.py b/openstack_dashboard/dashboards/project/access_and_security/keypairs/views.py index 2489a923ef..b0c38f57ce 100644 --- a/openstack_dashboard/dashboards/project/access_and_security/keypairs/views.py +++ b/openstack_dashboard/dashboards/project/access_and_security/keypairs/views.py @@ -23,7 +23,10 @@ from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse_lazy from django import http from django.template.defaultfilters import slugify # noqa +from django.utils.decorators import method_decorator from django.utils.translation import ugettext_lazy as _ +from django.views.decorators.cache import cache_control +from django.views.decorators.cache import never_cache from django.views.generic import View # noqa from horizon import exceptions @@ -101,6 +104,9 @@ class DownloadView(views.HorizonTemplateView): class GenerateView(View): + @method_decorator(cache_control(max_age=0, no_cache=True, + no_store=True, must_revalidate=True)) + @method_decorator(never_cache) def get(self, request, keypair_name=None, optional=None): try: if optional == "regenerate":