Remove SQL statement and replace with a cache