MyBB Community Forums

Full Version: Files cache option
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Using the latest code from github "05211dd970", When setting the cache option in the config file to "files" it writes the cache files to the disk but not does seem to use them.

As you can see there is very little change and I'm sure from 1.6 used less query's when file cache was enabled.

$config['cache_store'] = 'db';

Generated in 1.02 seconds (0.50% PHP / 99.50% MySQL) 
SQL Queries: 7 / Server Load: Unknown / Memory Usage: 768 KB

$config['cache_store'] = 'files';

Generated in 1.022 seconds (0.50% PHP / 99.50% MySQL) 
SQL Queries: 7 / Server Load: Unknown / Memory Usage: 768 KB

If this is not a bug and I'm not thinking right please close the thread.
It is using the file cache, but a new query is being ran.

SELECT title,cache FROM mybb_datacache WHERE title='forumpermissions'

The read() call to forumpermissions is a MISS because it's empty.
But that query is still useless as you can have no forum permission.
Most mybb's cache method use two calls. DB + Your method.

I dont know why is it done, its useless.
It's not useless. Some cache systems (memcache, APC,...) are not persistent. If the data wouldn't be stored in the database there would be no way to recover it (for example all plugins would be disabled).