From a0c141d6ac976e49741c11f36960cb717e6deb99 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 6 May 2022 11:10:40 +0100 Subject: [PATCH] FIX: Ensure theme JavaScript cache get consistent SHA1 digest (stable backport) (#16669) (Stable backport of 7ed899f) There is a couple of layers of caching for theme JavaScript in Discourse: The first layer is the `javascript_caches` table in the database. When a theme with JavaScript files is installed, Discourse stores each one of the JavaScript files in the `theme_fields` table, and then concatenates the files, compiles them, computes a SHA1 digest of the compiled JavaScript and store the results along with the SHA1 digest in the `javascript_caches` table. Now when a request comes in, we need to render `