Fixed a future potential bug by fetching the entity from cache and deleting that version from cache before syncing with the SQL database