title: How to stop Django caching view results
body: <p>I am new to Django framework.</p>
  
  <p>I am using : </p>
  
  <pre><code> python==2.7_win32
      Django==1.11.3
      djangorestframework==3.6.3
  </code></pre>
  
  <p>I am creating an API which do not involve any database.</p>
  
  <p><strong>Flow of data is :</strong> </p>
  
  <ol>
  <li><p>User Request in JSON</p></li>
  <li><p>Invoking method in Django's views.py</p></li>
  <li><p>This method calls <strong>my local package that is not part of django</strong> and gets result</p></li>
  <li><p>Return this result in the Response</p></li>
  </ol>
  
  <p><strong>Problem is :</strong> 
  It works perfectly in the first request but on the next request it gives previous result only.</p>
  
  <p>I found that django caches the <code>Queryset</code> and we can force to read new data by adding <code>all()</code> method.</p>
  
  <p>But my code do not involve any Database or Model. So I think QuerySet will also not created.But still my results are getting cached somehow. how can I stop it?</p>
  
  <p>Here is my view : </p>
  
  <pre><code>@api_view(['POST'])
  @never_cache
  def filter_details(request):
  
      data = {}
      data['data'] = {}
      result_array = []
      error = None 
  
      try:
          attr1 = request.data.get("attr1")
          attr2 = request.data.get("attr2")
          local_package_obj = local_package.ClassName(attr1)
          result_array = local_package_obj.get_some_data_as_array(attr2)
      except Exception as e:
          error = str(e)
  
      data['data']['important'] = result_array
      data['error'] = error
  
      return Response(data)
  </code></pre>
  
  <p>Even after applying different values for att1 and attr2 I am getting same results.
  I have checked local package. I works properly. The problem is in caching only.</p>