function query($query, $cacheType, $cacheDuration, $responseType)
$query = Query to be executed.
$cacheType = Memcached etc.
$cacheDuration = Duration of cache.
$responseType = MySQL response type. (e.g array, json etc)
I don't want to use cache, but expect to be JSON. How can I pass those 2 parameters?
If I set cacheType to "Memcached", how can I ensure a $cacheDuration is set to a valid integer?
If I add a fifth parameter to query function (e.g $fifth), how can I add it without breaking the calls used in entire website? They still give 4 parameters, but query updated to be 5 parameters.
I'm looking for "good practise" responses mostly, otherwise I know passing NULL values to params.