From 29591598638f9b5c544c4bdd5a8e5e383b8f7eba Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Wed, 21 Jun 2017 01:40:55 +0530 Subject: [PATCH] Added cache_control decorator to control cache while returning back to the index page --- datacenterlight/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 427f8c70..2b304606 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -10,6 +10,7 @@ from django.shortcuts import render from django.shortcuts import redirect from django import forms from django.core.exceptions import ValidationError +from django.views.decorators.cache import cache_control from opennebula_api.models import OpenNebulaManager from opennebula_api.serializers import VirtualMachineTemplateSerializer @@ -170,6 +171,7 @@ class IndexView(CreateView): success_url = "/datacenterlight#requestform" success_message = "Thank you, we will contact you as soon as possible" + @cache_control(no_cache=True, must_revalidate=True, no_store=True) def get(self, request, *args, **kwargs): try: manager = OpenNebulaManager()