Adding cache of result count if the query doesn't change, disabling sorting records in descending order via config