Improve way to cache document page images and invalidate them. Update related code.

This commit is contained in:
Roberto Rosario
2015-06-16 16:20:17 -04:00
parent 51e4b8b44c
commit 394a90458a
3 changed files with 32 additions and 12 deletions

View File

@@ -22,8 +22,10 @@ def task_get_document_page_image(document_page_id, *args, **kwargs):
@app.task(ignore_result=True)
def task_clear_image_cache():
# TODO: Error logging / notification
Document.clear_image_cache()
logger.info('Starting document cache invalidation')
# TODO: Notification of success and of errors
Document.objects.invalidate_cache()
logger.info('Finished document cache invalidation')
@app.task(ignore_result=True)