{"id":18993931,"date":"2026-08-14T18:46:47","date_gmt":"2026-08-14T18:46:47","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/destructor-conflict-with-sqlite-object-cache\/"},"modified":"2026-08-14T18:46:47","modified_gmt":"2026-08-14T18:46:47","slug":"destructor-conflict-with-sqlite-object-cache","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/destructor-conflict-with-sqlite-object-cache\/","title":{"rendered":"Destructor conflict with SQLite Object Cache"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hello, I&#8217;m the author of <a href=\"https:\/\/wordpress.org\/plugins\/sqlite-object-cache\/\">SQLite Object Cache<\/a>.  A mutual user has reported this defect to me. <a href=\"https:\/\/github.com\/OllieJones\/sqlite-object-cache\/issues\/119\">https:\/\/github.com\/OllieJones\/sqlite-object-cache\/issues\/119<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SQLite Object Cache needs to use __destruct() to both keep its SQLite session open as long as possible, and to avoid a session leak. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And your Loco Translate relies on __destruct() to use set_transient to persist an instance of your <code>Loco_gettext_Metadata<\/code> class.  But php calls my __destruct() before yours. There&#8217;s more detail in the github ticket linked above.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Is it possible for you to persist your data from a shutdown handler rather than relying on the destructor? Thanks. <\/p>\n","protected":false},"template":"","class_list":["post-18993931","topic","type-topic","status-publish","hentry","topic-tag-object-cache","topic-tag-persistence","topic-tag-transient"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18993931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18993931\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18993931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}