Non-functional optimization.
Add a parameter $clearCache for method hasTable() to force cache refreshing.