quick middleware to set cache time for a path