title: Django - cache view response for the remainder of the day
body: <p>So, <code>django.views.decorators.cache</code> defines a <code>cache_page</code> decorator that will automatically cache the view’s response for you, such as:</p>
  <pre><code>from django.views.decorators.cache import cache_page
  
  @cache_page(60 * 15)
  def my_view(request):
      ...
  </code></pre>
  <p>I'm hoping this is a super simple &quot;yes&quot; - but can this be set dynamically?</p>
  <p>So I want to calculate on the fly the number of seconds left from say, <code>dt_now</code> (which is now) to the end of the day, so <code>dt_now.replace(hours=23, minute=59, ..., microseconds=9999999)</code>.</p>
  <p>Is it possible to evaluate the cache page dependent on such a dynamic value?</p>