JIRA 480: implemented a patch to Whoosh cache to prevent race conditions during the deletion of entries to raise an exception. Used a lock to avoid concurrent executions.