def _on_article_add(app, article=None): from service import remove_cached_location from service import remove_cached_all_location_names, remove_cached_article_count_by_keyword, \ remove_cached_article_id_by_keyword, remove_cached_article_id_by_geo after_commit(remove_cached_all_location_names) after_commit(functools.partial(remove_cached_location, article.location_id)) after_commit(remove_cached_article_count_by_keyword) after_commit(remove_cached_article_id_by_keyword) after_commit(remove_cached_article_id_by_geo)
def _on_article_asset_update(app, article_id=None): from service import remove_cached_article after_commit(functools.partial(remove_cached_article, article_id))
def _on_location_add(app, location=None): from service import remove_cached_all_location_names, remove_cached_location_id_by_geo after_commit(remove_cached_all_location_names) after_commit(remove_cached_location_id_by_geo)
def _on_artifact_remove(app, artifact_id=None): from service import remove_cached_artifact after_commit(functools.partial(remove_cached_artifact, artifact_id))
def _on_tag_remove(app): from service import remove_all_cached_artifact after_commit(remove_all_cached_artifact)
def _on_theme_tag_add_or_remove(app): from service import remove_cached_theme_tags after_commit(remove_cached_theme_tags)
def _on_material_tag_add_or_remove(app): from service import remove_cached_material_tags after_commit(remove_cached_material_tags)