Title: Destructor conflict with SQLite Object Cache
Last modified: August 14, 2026

---

# Destructor conflict with SQLite Object Cache

 *  [OllieJones](https://wordpress.org/support/users/olliejones/)
 * (@olliejones)
 * [3 weeks, 3 days ago](https://wordpress.org/support/topic/destructor-conflict-with-sqlite-object-cache/)
 * Hello, I’m the author of [SQLite Object Cache](https://wordpress.org/plugins/sqlite-object-cache/).
   A mutual user has reported this defect to me. [https://github.com/OllieJones/sqlite-object-cache/issues/119](https://github.com/OllieJones/sqlite-object-cache/issues/119)
 * SQLite Object Cache needs to use __destruct() to both keep its SQLite session
   open as long as possible, and to avoid a session leak.
 * And your Loco Translate relies on __destruct() to use set_transient to persist
   an instance of your `Loco_gettext_Metadata` class. But php calls my __destruct()
   before yours. There’s more detail in the github ticket linked above.
 * Is it possible for you to persist your data from a shutdown handler rather than
   relying on the destructor? Thanks.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [2 weeks, 6 days ago](https://wordpress.org/support/topic/destructor-conflict-with-sqlite-object-cache/#post-18996301)
 * Sorry for the delay. I was on holiday.
 * The lazy persistence code you’re referring to was written in 2019. I don’t recall
   why I architected it this way, but a shutdown handler is something I could look
   at if I had the time, but I’m afraid I don’t. My priorities for this plugin are
   essential maintenance at this point. That means tracking breaking changes in 
   WordPress and PHP versions, and avoiding plugin closure by applying security 
   fixes. Unfortunately, ensuring against conflicts with all other tenants of the
   WordPress APIs is not something I can prioritise unless it’s affecting a lot 
   of users.
   I can see you closed your Github issue. Does this mean it’s a non-issue
   now?

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdestructor-conflict-with-sqlite-object-cache%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/loco-translate/assets/icon-256x256.png?rev=1000676)
 * [Loco Translate](https://wordpress.org/plugins/loco-translate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/loco-translate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/loco-translate/)
 * [Active Topics](https://wordpress.org/support/plugin/loco-translate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/loco-translate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/loco-translate/reviews/)

## Tags

 * [object-cache](https://wordpress.org/support/topic-tag/object-cache/)
 * [persistence](https://wordpress.org/support/topic-tag/persistence/)
 * [transient](https://wordpress.org/support/topic-tag/transient/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * Last activity: [2 weeks, 6 days ago](https://wordpress.org/support/topic/destructor-conflict-with-sqlite-object-cache/#post-18996301)
 * Status: not resolved