[TNL-7771][LX-1409] sets blockstore values timeouts to avoid S3 links expiration (#25830)

This commit is contained in:
Raul Gallegos
2020-12-11 09:35:45 -05:00
committed by GitHub
parent e49e3fa566
commit 5279975483
3 changed files with 8 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ and won't find the now-invalid cached data.
from datetime import datetime
from uuid import UUID
from django.conf import settings
from django.core.cache import caches, InvalidCacheBackendError
from pytz import UTC
import requests
@@ -81,7 +82,7 @@ class BundleCache(object):
"""
assert isinstance(key_parts, (list, tuple))
full_key = _get_versioned_cache_key(self.bundle_uuid, self.draft_name, key_parts)
return cache.set(full_key, value, timeout=None)
return cache.set(full_key, value, timeout=settings.BLOCKSTORE_BUNDLE_CACHE_TIMEOUT)
def clear(self):
"""