avoid cache

This commit is contained in:
j 2017-08-02 17:12:30 +02:00
parent b82f222c73
commit ed97ae2423
1 changed files with 2 additions and 0 deletions

View File

@ -880,6 +880,7 @@ def poster(request, id, size=None):
poster_path = os.path.join(settings.STATIC_ROOT, 'jpg/poster.jpg')
response = HttpFileResponse(poster_path, content_type='image/jpeg')
response['Cache-Control'] = 'no-cache'
response['Expires'] = datetime.strftime(datetime.utcnow() - timedelta(days=1), "%a, %d-%b-%Y %H:%M:%S GMT")
return response
def icon(request, id, size=None):
@ -892,6 +893,7 @@ def icon(request, id, size=None):
poster_path = os.path.join(settings.STATIC_ROOT, 'jpg/poster.jpg')
response = HttpFileResponse(poster_path, content_type='image/jpeg')
response['Cache-Control'] = 'no-cache'
response['Expires'] = datetime.strftime(datetime.utcnow() - timedelta(days=1), "%a, %d-%b-%Y %H:%M:%S GMT")
return response
def timeline(request, id, size, position=-1, format='jpg', mode=None):