Try using only the cache for inbox timeline

merge-requests/30/head
Bob Mottram 2021-09-03 10:07:18 +01:00
parent 33578b0842
commit 46b8f60dfc
2 changed files with 9 additions and 2 deletions

View File

@ -1118,7 +1118,8 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
showIcons: bool = False,
manuallyApprovesFollowers: bool = False,
showPublicOnly: bool = False,
storeToCache: bool = True) -> str:
storeToCache: bool = True,
useCacheOnly: bool = False) -> str:
""" Shows a single post as html
"""
if not postJsonObject:
@ -1176,6 +1177,8 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
signingPrivateKeyPem)
if postHtml:
return postHtml
if useCacheOnly:
return ''
_logPostTiming(enableTimingLog, postStartTime, '4')

View File

@ -810,6 +810,10 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
+ boxName + ' ' + str(timelineJson))
return ''
useCacheOnly = False
if boxName == 'inbox':
useCacheOnly = True
if timelineJson:
# if this is the media timeline then add an extra gallery container
if boxName == 'tlmedia':
@ -876,7 +880,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
boxName != 'dm',
showIndividualPostIcons,
manuallyApproveFollowers,
False, True)
False, True, useCacheOnly)
_logTimelineTiming(enableTimingLog,
timelineStartTime, boxName, '12')