Closed smaiorana closed 1 year ago
@quicksketch Not sure who's maintaining this module, but I noticed you've done the conversion from Drupal so I'm making you aware of the issue.
Thanks @smaiorana! I had encountered this problem with the bootstrap bin in particular being unreliable. I'll make a new release right away to include this fix.
I never could get Memcache to be reliable in Backdrop, perhaps this will be the fix that's needed?
The Drupal 7 version had a very weird manipulation of the variables
table to store the wildcard cache clear timestamps; which made it so that the Memcache backend had a dependency on the database. I tried to remove the database dependency for the Backdrop version, but it hasn't been reliable. Please let me know your experience!
Hi @quicksketch. We've been running this fix for over a year on multiple sites without issue. From our end, it appears the fix seems to resolve all our major Memcache problems.
Just a few weeks ago, we restructured some of our Backdrop sites and found out that we accidentally reverted to using 1.x-1.8.0-beta2 of this module, as it is still the last official release listed on the Backdrop CMS website. This introduced some old Memcache issues all over again. Is it possible to set up 1.x-1.8.0-beta3 as the latest official release? It seems to me to fix a lot of the major Memcache issues.
@smaiorana Oh man, I'm sorry! I made a tag but not a release for beta3. I've created the release so it should now take precedence over beta2.
It appears several cache bins are not being properly flushed from Memcache on a cache clear. This includes the
bootstrap
bin, for example. The problem can be replicated easily by addinghook_init()
to a module that doesn't already implement the hook, then attempting to trigger the new hook after a cache clear. Thebootstrap
bin never actually gets cleared, so the hook will never fire.It appears this is happening because the cache flush timestamp is being are stored with a state name of
flush
but accessed with a state name offlush_timestamp
.This is from the
flush()
method:This is from the
reloadVariables()
method:Changing state name instances of
flush
toflush_timestamp
seems to fix the issue. I am going to submit a PR to address this.