MyBB Community Forums

Full Version: Cache classes and their constructors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The "datacache" class passes a variable "$silent" to the constructor and calls "connect" afterwards without any parameters. However the different classes ignore that:

APC (ok):
-> function __construct($silent)
-> function connect()

Disk (wrong):
-> function connect($silent)

eaccelerator (partly ok; others are like this too):
-> function eacceleratorCacheHandler($silent): is a valid constructor but "__construct" should be used instead
-> function connect()

A new interface should be added which has all the cache functions and forces the first version imho, similar to what @Euan did with the database classes.
Apparently the "$silent" parameter is ignored by all cache classes we have. Same applies to the "$hard_refresh" parameter for the "fetch" function...
(2015-06-11, 09:28 AM)JonesĀ H Wrote: [ -> ]A new interface should be added which has all the cache functions and forces the first version imho, similar to what @Euan did with the database classes.

So much yes. I've been meaning to give the cache classes the same treatment for a while.
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/2102

Thanks for contributing to MyBB!

Regards,
The MyBB Group