Sorry, I made a quick conclusion but not correct.
If MyBB is using a cache handler other than database (
db
) and the cache engine get lost on some cache keys, it will fall back to query on the
datacache
table in database. There won't be any problem if this table doesn't lose any essential records. But the table does lose some essential records, for example
forumpermissions
, only rebuild the cache from AdminCP will not bring it back, meaning the forum permissions won't get right.
So, MyBB's part seems doing fine. I suppose there might be something wrong with your Memcached server. I haven't used any other cache handler other than the database, so let me have a guess if your Memcached is serving invalid data upon a restart.
I did some search in code and seems what I've said is not simply similar to your problem, but still exists:
Quote:It's not dedicated to Memcached. Using db
, for example, as a cache handler, missing forumpermissions
record from the database will caused the issue, too. And looks like rebuild cache in AdminCP only reload existing cache but not really *rebuild* missing ones.
Seems MyBB DOES NOT DO integrity check on cache... It tries to work if some caches are lost, until all are lost, it will stop working. It didn't become a problem to me before you mention the forumpermissions
's lost in cache. I was thinking it should be the forum owner's responsibility to maintain the database integrity, because I only have used db
as cache handler.
Update post.
Found this:
https://pecl.php.net/package-info.php?pa...on=2.0.0b1
Quote:Release notes
Version 2.0.0b1
(beta) - Change the return value for non-existing keys to be NULL rather than
'false', affects simple get only
Not sure if this matters. MyBB checks a cached entry from Memcached if it is
=== false
. If it is not
=== false
, the value returned by Memcached is used; otherwise, MyBB will fetch that from database. However, PHP document says that action will
Returns the value stored in the cache or FALSE otherwise
.
I'm confused. Seems this is the culprit but I'm not sure. Could let anyone who uses Memcached to test it.
Could be wrong but worth a try.