adding cache_time to middleware