OllieJones / sqlite-object-cache

A WordPress persistent object cache for the rest of us.
GNU General Public License v2.0
24 stars 4 forks source link

Enhancement: optional features designed as workarounds when a timeout is detected #40

Open wabetainfo opened 8 months ago

wabetainfo commented 8 months ago

I wanted to suggest some optional features that the user could activate in case they experience random timeouts caused by the plugin.

  1. Direct query to the MariaDB database: if, for any reason, the database created by the plugin becomes inaccessible or locked due to a process, this optional feature temporarily enables direct querying of the MariaDB database. This is intended to avoid the website staying inaccessible while waiting for the database generated by the plugin to be unlocked.
  2. Automatic deactivation and reactivation: this optional feature would restart the object caching system when some timeouts are detected. The database generated by the plugin and object-cache.php are then deleted, and the plugin is restarted after a few minutes, regenerating the database and object-cache.php, so that the process causing the timeout can be halted. Based on my experience, when my website becomes inaccessible due to this plugin, I immediately delete the database, object-cache.php, and I disable the plugin, resolving the issue instantly. Then, I reactivate the plugin.

I understand that these features may seem aggressive, that's why they are marked as optional, allowing the user to decide whether to activate them or not. In case you disagree, I would appreciate it if you could explore alternative optional features designated as workarounds. I understand that debugging this issue is very complicated due to the limited information available. As a result, I believe implementing new features that operate in these moments could be beneficial for users who frequently encounter timeouts on their websites. As always, thanks for your efforts to make this plugin better!