Hi guys (probably Robert specifically)
I had a cache problem before and it's this thread where we were having an issue with cache going to S3 in our setup:
https://wpforo.com/community/how-to-and-troubleshooting-2/wpforo-cache-s3-uploads/#post-103744
And this ended with you adding a filter for me to change the cache location and we thought all was fine.
I recently became aware of S3 costs for the client were spiralling to thousands per month in costs and when we investigated this is was because of literally 100's of millions of S3 requests being made for the wpforo cached options.
We looked into this and found that the reason was because although there is that filter added in the cache class there is another file which is calling options from the default cache location in another class, when that is called to get cached options it has not had the default cache location modified so it tries to get them from S3.
In order to resolve this and allow us to go back to the official unmodded version of the wpforo plugin can you please add the following filter into your next release in the root wpforo.php file? This allows us to modify or rather override the cache directory on initialization so its correct even when used outside of the cache class.
$this->folders = apply_filters('wpforo_working_folders', $this->folders);
do_action('wpforo_after_init_folders', $this->folders);
If you do add this it may be worth removing the filter from cache class as it does not function properly anyway as I described its up to yourselves obviously.
Thanks.
PS: not that you need it but we used it like so as a filter if anyone else finds this useful obviously the constant var etc will differ for each setup:
add_filter('wpforo_working_folders', function ($folders) {
$folders['cache'] = [
'dir' => WPFORO_CACHE_DIR,
'url' => trailingslashit(home_url()) . str_replace('/app/web/', '', WPFORO_CACHE_DIR),
'url//' => str_replace('https:', '', home_url()) . str_replace('app/web/', '', WPFORO_CACHE_DIR),
];
return $folders;
}, 1000, 2);