GET_LOCK and RELEASE_LOCK get cached
-
Hiya! I love W3TC and use it extensively. Recently, we’ve been working on a plugin that receives some data from external services. Sometimes the same data is sent several times and we might receive each of those requests within 0.1 sec of each other. To prevent duplication, our plugin uses
SELECT GET_LOCK(my_plugin_lock_name, 10)
andSELECT RELEASE_LOCK(my_plugin_lock_name)
to do a lock around the “does this data exist?” check. Unfortunately, enabling W3TC broke this lock and duplicates started seeping in.The fix was easy: we simply added “lock” to the “Reject query words:” setting. But this left me wondering: should get_lock and release_lock be added as default settings to the plugin? If any other plugin happens to use db locks, it’s pretty much broken when W3TC is enabled. Let me know what you think ??
- The topic ‘GET_LOCK and RELEASE_LOCK get cached’ is closed to new replies.