Since this code depends on`CACHE_TIME`, had to be moved to the end of the file.