{"id":2139,"date":"2026-08-26T10:00:00","date_gmt":"2026-08-26T10:00:00","guid":{"rendered":"https:\/\/muzi.tw\/thinking\/object-cache-lies-tmp-en-us\/"},"modified":"2026-09-28T03:37:44","modified_gmt":"2026-09-28T03:37:44","slug":"object-cache-lies","status":"publish","type":"post","link":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/","title":{"rendered":"The database has the new value. The site is reading the old one."},"content":{"rendered":"<p class=\"mz-nt-lead\">We needed to change one setting, and we took the shortest route: write it straight into the database.<\/p>\n<p>The write succeeded, and a query returned the new value. The application kept reading the old one.<\/p>\n<h2>The symptoms point the wrong way<\/h2>\n<p>That setting decides which set of styles is active. Reading the old value meant the new set never loaded. No styles, no functions, and the front end dropped back to its default look.<\/p>\n<p><strong>That looks exactly like &#8220;the new set has an error, so the system fell back to the default.&#8221;<\/strong> We spent a while down that path, checking syntax, required files and the declaration format. All fine.<\/p>\n<h2>The test<\/h2>\n<p>Ask the system two questions. Does that set have any errors? Can the system list it?<\/p>\n<p>If there are no errors and it shows up in the list, it isn&#8217;t broken. <strong>The problem isn&#8217;t at either end. It&#8217;s in the middle: something is sitting between you and the database.<\/strong><\/p>\n<p>That something is the persistent object cache. When the application reads a setting, it asks the cache first, and if the cache has a value it never goes to the database.<\/p>\n<h2>Two rules<\/h2>\n<p class=\"mz-nt-num\"><strong>\u2460 After any write that bypasses the application layer, clear the cache.<\/strong><\/p>\n<p class=\"mz-nt-num\"><strong>\u2461 Then verify from a fresh process.<\/strong> In the same process, the styles and functions were loaded long before you cleared anything, so checking on the spot still comes back empty and you&#8217;ll conclude that clearing didn&#8217;t help. We made that mistake too.<\/p>\n<h2>The bigger lesson<\/h2>\n<p>Taking a shortcut isn&#8217;t the mistake. Forgetting what the shortcut skipped is.<\/p>\n<p>Every layer of cache is a copy, and every copy is another chance to be lied to.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Write to the database behind the application&#8217;s back, add a persistent object cache, and the symptoms look like a completely different failure.<\/p>\n","protected":false},"author":1,"featured_media":1026,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[29],"tags":[],"class_list":["post-2139","post","type-post","status-publish","format-standard","has-post-thumbnail","category-web-notes-en-us"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The database has the new value. The site is reading the old one. - Muzi Studio<\/title>\n<meta name=\"description\" content=\"Write to the database behind the application&#039;s back, add a persistent object cache, and the symptoms look like a completely different failure.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The database has the new value. The site is reading the old one. - Muzi Studio\" \/>\n<meta property=\"og:description\" content=\"Write to the database behind the application&#039;s back, add a persistent object cache, and the symptoms look like a completely different failure.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/\" \/>\n<meta property=\"og:site_name\" content=\"Muzi Studio\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-26T10:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-28T03:37:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/muzi.tw\/wp-content\/uploads\/2026\/09\/muzi-nt-object-cache-93933eaf.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"1004\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/\"},\"author\":{\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/#organization\"},\"headline\":\"The database has the new value. The site is reading the old one.\",\"datePublished\":\"2026-08-26T10:00:00+00:00\",\"dateModified\":\"2026-09-28T03:37:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/\"},\"wordCount\":297,\"publisher\":{\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/muzi.tw\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/muzi-nt-object-cache-93933eaf.jpg\",\"articleSection\":[\"Web &amp; Technology\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/\",\"url\":\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/\",\"name\":\"The database has the new value. The site is reading the old one. - Muzi Studio\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/muzi.tw\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/muzi-nt-object-cache-93933eaf.jpg\",\"datePublished\":\"2026-08-26T10:00:00+00:00\",\"dateModified\":\"2026-09-28T03:37:44+00:00\",\"description\":\"Write to the database behind the application's back, add a persistent object cache, and the symptoms look like a completely different failure.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/#primaryimage\",\"url\":\"https:\\\/\\\/muzi.tw\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/muzi-nt-object-cache-93933eaf.jpg\",\"contentUrl\":\"https:\\\/\\\/muzi.tw\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/muzi-nt-object-cache-93933eaf.jpg\",\"width\":1800,\"height\":1004,\"caption\":\"A transparent lens clamped between two plates with blue and purple light glowing from underneath\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/thinking\\\/object-cache-lies\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/muzi.tw\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The database has the new value. The site is reading the old one.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/muzi.tw\\\/en\\\/\",\"name\":\"Muzi Studio\",\"description\":\"Muzi Studio\",\"publisher\":{\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/muzi.tw\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/#organization\",\"name\":\"Muzi Studio\",\"url\":\"https:\\\/\\\/muzi.tw\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/muzi.tw\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/muzi-logo-512.png\",\"contentUrl\":\"https:\\\/\\\/muzi.tw\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/muzi-logo-512.png\",\"width\":512,\"height\":512,\"caption\":\"Muzi Studio\"},\"image\":{\"@id\":\"https:\\\/\\\/muzi.tw\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"email\":\"hello@muzi.tw\",\"description\":\"A brand, web, and content studio in Taipei and Tokyo. We look at your business growth goals and current gaps before deciding if design is the answer.\",\"areaServed\":[\"Taiwan\",\"Japan\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The database has the new value. The site is reading the old one. - Muzi Studio","description":"Write to the database behind the application's back, add a persistent object cache, and the symptoms look like a completely different failure.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/","og_locale":"en_US","og_type":"article","og_title":"The database has the new value. The site is reading the old one. - Muzi Studio","og_description":"Write to the database behind the application's back, add a persistent object cache, and the symptoms look like a completely different failure.","og_url":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/","og_site_name":"Muzi Studio","article_published_time":"2026-08-26T10:00:00+00:00","article_modified_time":"2026-09-28T03:37:44+00:00","og_image":[{"width":1800,"height":1004,"url":"https:\/\/muzi.tw\/wp-content\/uploads\/2026\/09\/muzi-nt-object-cache-93933eaf.jpg","type":"image\/jpeg"}],"author":"admin","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/#article","isPartOf":{"@id":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/"},"author":{"@id":"https:\/\/muzi.tw\/en\/#organization"},"headline":"The database has the new value. The site is reading the old one.","datePublished":"2026-08-26T10:00:00+00:00","dateModified":"2026-09-28T03:37:44+00:00","mainEntityOfPage":{"@id":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/"},"wordCount":297,"publisher":{"@id":"https:\/\/muzi.tw\/en\/#organization"},"image":{"@id":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/#primaryimage"},"thumbnailUrl":"https:\/\/muzi.tw\/wp-content\/uploads\/2026\/09\/muzi-nt-object-cache-93933eaf.jpg","articleSection":["Web &amp; Technology"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/","url":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/","name":"The database has the new value. The site is reading the old one. - Muzi Studio","isPartOf":{"@id":"https:\/\/muzi.tw\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/#primaryimage"},"image":{"@id":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/#primaryimage"},"thumbnailUrl":"https:\/\/muzi.tw\/wp-content\/uploads\/2026\/09\/muzi-nt-object-cache-93933eaf.jpg","datePublished":"2026-08-26T10:00:00+00:00","dateModified":"2026-09-28T03:37:44+00:00","description":"Write to the database behind the application's back, add a persistent object cache, and the symptoms look like a completely different failure.","breadcrumb":{"@id":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/#primaryimage","url":"https:\/\/muzi.tw\/wp-content\/uploads\/2026\/09\/muzi-nt-object-cache-93933eaf.jpg","contentUrl":"https:\/\/muzi.tw\/wp-content\/uploads\/2026\/09\/muzi-nt-object-cache-93933eaf.jpg","width":1800,"height":1004,"caption":"A transparent lens clamped between two plates with blue and purple light glowing from underneath"},{"@type":"BreadcrumbList","@id":"https:\/\/muzi.tw\/en\/thinking\/object-cache-lies\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/muzi.tw\/en\/"},{"@type":"ListItem","position":2,"name":"The database has the new value. The site is reading the old one."}]},{"@type":"WebSite","@id":"https:\/\/muzi.tw\/en\/#website","url":"https:\/\/muzi.tw\/en\/","name":"Muzi Studio","description":"Muzi Studio","publisher":{"@id":"https:\/\/muzi.tw\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/muzi.tw\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/muzi.tw\/en\/#organization","name":"Muzi Studio","url":"https:\/\/muzi.tw\/en\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/muzi.tw\/en\/#\/schema\/logo\/image\/","url":"https:\/\/muzi.tw\/wp-content\/uploads\/2026\/09\/muzi-logo-512.png","contentUrl":"https:\/\/muzi.tw\/wp-content\/uploads\/2026\/09\/muzi-logo-512.png","width":512,"height":512,"caption":"Muzi Studio"},"image":{"@id":"https:\/\/muzi.tw\/en\/#\/schema\/logo\/image\/"},"email":"hello@muzi.tw","description":"A brand, web, and content studio in Taipei and Tokyo. We look at your business growth goals and current gaps before deciding if design is the answer.","areaServed":["Taiwan","Japan"]}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/muzi.tw\/wp-content\/uploads\/2026\/09\/muzi-nt-object-cache-93933eaf.jpg","_links":{"self":[{"href":"https:\/\/muzi.tw\/en\/wp-json\/wp\/v2\/posts\/2139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/muzi.tw\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/muzi.tw\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/muzi.tw\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/muzi.tw\/en\/wp-json\/wp\/v2\/comments?post=2139"}],"version-history":[{"count":2,"href":"https:\/\/muzi.tw\/en\/wp-json\/wp\/v2\/posts\/2139\/revisions"}],"predecessor-version":[{"id":2141,"href":"https:\/\/muzi.tw\/en\/wp-json\/wp\/v2\/posts\/2139\/revisions\/2141"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/muzi.tw\/en\/wp-json\/wp\/v2\/media\/1026"}],"wp:attachment":[{"href":"https:\/\/muzi.tw\/en\/wp-json\/wp\/v2\/media?parent=2139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/muzi.tw\/en\/wp-json\/wp\/v2\/categories?post=2139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/muzi.tw\/en\/wp-json\/wp\/v2\/tags?post=2139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}