From b4568ec03e2dc0cb02d282a38b9e06efd9a2bf5c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 12 Feb 2023 16:58:45 +0000 Subject: [PATCH] Caching of announced posts --- webapp_post.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webapp_post.py b/webapp_post.py index 2488d6555..0bb9592bf 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -2773,10 +2773,13 @@ def individual_post_as_html(signing_priv_key_pem: str, if not show_public_only and store_to_cache and \ box_name != 'tlmedia' and box_name != 'tlbookmarks' and \ box_name != 'bookmarks': + cached_json = post_json_object + if announce_json_object: + cached_json = announce_json_object _save_individual_post_as_html_to_cache(base_dir, nickname, domain, - post_json_object, post_html) + cached_json, post_html) update_recent_posts_cache(recent_posts_cache, max_recent_posts, - post_json_object, post_html) + cached_json, post_html) _log_post_timing(enable_timing_log, post_start_time, '19')