mirror of https://gitlab.com/bashrc2/epicyon
Try using only the cache for inbox timeline
parent
33578b0842
commit
46b8f60dfc
|
@ -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')
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
Loading…
Reference in New Issue