Question regarding cache, I have had to disable this because when running S3 Uploads plugin by humanmade its trying to offload anything put into /uploads/ including the cache off to S3 this increases forum load times to over 100 seconds per page load when its enabled (I have disabled it)
I would like to use the cache but can not find a method of overriding the location it stores the cache to keep this locally vs the plugin trying to offload it to S3 because of where its being stored.
Is this possible or is cache simply not usable in this instance?
Hi @sc89me,
We understand the issue, but the problem is that we don't have any option to change the folder of the cache.
Can you check, maybe, there is an option to exclude a folder? If no, please contact the creators with the issue.
I'm sorry but we can't do anything from our side.
we don't have any option to change the folder of the cache.
I see you don't but are you saying as plugin authors you can't create such an option or you won't create such an option?
Looking in the Cache class in the plugin it doesn't seem overly difficult to change this to another location but because its (all the filters) are wrapped up in the class and can't be accessed from another plugin / theme it seems impossible to modify this without modifying the core files in your plugin.
I will check for the ability to exclude paths in S3 Uploads plugin but to my knowledge they don't have this but I will go investigate.
EDIT: Just checked they state there is no method of excluding a path and you have to change the path on the thing trying to store files. So I guess this is an incompatibility with your plugin and S3 then as far as cache goes.
Well when its on the load times can be over 100 seconds. When its over they are 4-5 seconds which is why would would like to get it working in order to see if it can speed this up. @Chris
but we don't have any option to do anything.
I modified : wpforo\classes\Cache.php
Added:
$cache_dir = apply_filters('wpforo_cache_dir', $folders['cache']['dir'], $folders);
To the construct:
function __construct() {
add_action( 'wpforo_after_init_folders', function( $folders ) {
$cache_dir = apply_filters('wpforo_cache_dir', $folders['cache']['dir'], $folders);
This let me change the directory to another directory, it took the query count on forum load down from 1000+ to 500 queries and shaves 2-3 seconds off page load.
Can this be in the next release?