Tweak cache to use ConcurrentHashMap instead of HashMap to avoid ConcurrentModificationExceptions
Shared method to convert a ResultSet to a JSONObject