Fixed bug in cache response function for max-age