Closed radoslawkoziol closed 4 years ago
As in the topic, is it possible to set cache-control metadata somehow? I've tried to do it this way:
$fs->write($fileName, 'content', [ 'visibility' => AdapterInterface::VISIBILITY_PUBLIC, 'Expires' => '10', 'Cache-Control' => 'max-age=1000', // "Cache-Control" test1 'CacheControl' => 'max-age=2000', // "CacheControl" test2 'Metadata' => [ 'param1' => 'value1', 'param2' => 'value2' ], 'metadata' => [ 'param3' => 'value3', 'param4' => 'value4' ] ]);
but it doesn't seem to be working (in fact, any of those).
I need to set it, because all of my files are public, but sometimes I need to update it and then I still see the old file.
I've found the solution.
$fs->write($fileName, 'content', [ 'metadata' => [ 'cacheControl' => 'public, max-age=10' ] ]);
As in the topic, is it possible to set cache-control metadata somehow? I've tried to do it this way:
but it doesn't seem to be working (in fact, any of those).
I need to set it, because all of my files are public, but sometimes I need to update it and then I still see the old file.