Why Slim-HttpCache doesn't support Max-Age?


#1

Same as title. i have a question: Why Slim-HttpCache doesn’t support Max-Age ?

Or somebody tell me: Cache Control is best ?


#2

https://www.slimframework.com/docs/features/caching.html



// Register service provider with the container
$container = new \Slim\Container;
$container['cache'] = function () {
    return new \Slim\HttpCache\CacheProvider();
};

// Add middleware to the application
$app = new \Slim\App($container);
$app->add(new \Slim\HttpCache\Cache('public', 86400));

// Create your application routes...

// Run application
$app->run();

I think the second parameter of \Slim\HttpCache\Cache is max-age.