Prevent deadlock on variable table when clearing cache
Code review
Merge pull request #5792 from openscholar/os_search-deadlock

Prevent deadlock on variable table when clearing cache