Hi, did you find answers for your questions? I'm particulary interested on the "temporaryUrl" behaviour? Does it works with cache?
Cached adapter confusion
We currently have a setup where we use an S3 compatible storage driver. (Digital ocean spaces). We use spatie/Laravel-media-library to manage our assets.
I would like to install the cached adapter like suggested in the docs.
First step is to install the extra dependency: league/flysystem-cached-adapter ~1.0
Second step is to add a cache block to the filesystem driver. Like documented here: https://laravel.com/docs/7.x/filesystem#caching
I have some questions regarding the example:
'spaces' => [
'driver' => 's3',
// Other Disk Options...
'cache' => [
'store' => 'memcached',
'expire' => 600,
'prefix' => 'cache-prefix',
],
],
I assume the 'store' needs to be changed to any caching disk we use in our application? So in our case it should be 'store' => 'redis'.
Is the prefix mandatory because redis itself has a prefix so would this mean a double prefix for asset links?
Is the expire time in ms? We also make heave use of the temporaryUrl() feature to make sure URLs that get leaked are only temporary available, how does the temporaryUrl() work in combination with the expire header for caching ?
I might send a PR to laravel with the extra information because it is a bit vague in the current docs.
Please or to participate in this conversation.