Reduce cache times
This means content will be updated faster after changes
This commit is contained in:
parent
0ac02231ad
commit
c2150b66f3
3 changed files with 3 additions and 3 deletions
|
@ -27,6 +27,6 @@ class SingletonPageCache:
|
|||
|
||||
url = page.get_url(request)
|
||||
|
||||
cache.set(cache_key, url, 86400)
|
||||
cache.set(cache_key, url, 10800)
|
||||
|
||||
return url
|
||||
|
|
|
@ -12,7 +12,7 @@ from website.common.models import BasePage
|
|||
from website.contrib.singleton_page.utils import SingletonPageCache
|
||||
|
||||
|
||||
@django_cache_decorator(time=21600)
|
||||
@django_cache_decorator(time=600)
|
||||
def get_latest_blog_post() -> Optional[Tuple[str, str]]:
|
||||
from website.blog.models import BlogPostPage
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ from django.http.request import HttpRequest
|
|||
|
||||
def global_vars(request: HttpRequest) -> dict:
|
||||
# noop caching in preview
|
||||
fragment_cache_ttl = 0 if getattr(request, "is_preview", False) else 21600
|
||||
fragment_cache_ttl = 0 if getattr(request, "is_preview", False) else 3600
|
||||
return {
|
||||
"SEO_INDEX": settings.SEO_INDEX,
|
||||
"DEBUG": settings.DEBUG,
|
||||
|
|
Loading…
Reference in a new issue