forked from MarseyWorld/MarseyWorld
delete frontpage cache when moving posts
parent
dc23016f17
commit
e83be235ba
|
@ -105,6 +105,8 @@ def sub_inactive_purge_task():
|
|||
for x in dead_holes:
|
||||
g.db.delete(x)
|
||||
|
||||
cache.delete_memoized(frontlist)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ from files.helpers.get import *
|
|||
from files.helpers.alerts import *
|
||||
from files.helpers.actions import *
|
||||
from flask import g
|
||||
from files.__main__ import app, limiter
|
||||
from files.__main__ import app, limiter, cache
|
||||
from os import path
|
||||
from files.helpers.sanitize import filter_emojis_only
|
||||
|
||||
|
@ -180,4 +180,7 @@ def move_post(post:Submission, v:User, reason:str) -> Union[bool, str]:
|
|||
else: position = f'/h/{sub_from} Mod'
|
||||
message = f"@{v.username} ({position}) has moved [{post.title}]({post.shortlink}) to /h/{post.sub}"
|
||||
send_repeatable_notification(post.author_id, message)
|
||||
|
||||
cache.delete_memoized(frontlist)
|
||||
|
||||
return f"Post moved to /h/{post.sub}"
|
||||
|
|
Loading…
Reference in New Issue