Closed davidhaslip closed 1 year ago
I have added a new configuration option:
// Files with these extensions won't be cached.
$wgAWSLocalCacheExcludeFileExtensions = [ 'ogg', 'mp4' ]; // Default: [ 'ogg' ]
Please try it out (git clone -b local-cache-exclude-file-extensions
) and let me know if it works for you.
Awesome, thank you for adding this feature. I was getting an error however:
Error from line 136 of /home/public_html/mediawiki/vendor/guzzlehttp/guzzle/src/functions.php: Undefined class constant 'VERSION'
Not sure if this helps: `#0 /mediawiki/extensions/AWS/vendor/aws/aws-sdk-php/src/Handler/GuzzleV6/GuzzleHandler.php(40): GuzzleHttp\default_user_agent()
Are you using the installation method with composer.local.json
(see README)? The old installation method (with composer install
in the directory extension/AWS/
) was replaced due to Guzzle-related problems similar to this.
Ok thanks. I followed those instructions and it's working as expected now. I appreciate it a lot!
I use $wgAWSLocalCacheMinSize to speed up rendering of page thumbnails from PDF files, but audio and video files are also captured and stored in the local cache. With a lot of audio or video files it becomes expensive to store them locally. Can a setting be added to allow excluding certain file types and prevent them from being saved locally? Perhaps: $wgAWSLocalCacheExclude ?