- Issue created by @slucero
- Status changed to Needs review
about 1 year ago 7:56pm 7 December 2023 - last update
about 1 year ago Patch Failed to Apply - Merge request !91Only invalidate the namespace cache once per request. → (Merged) created by slucero
- last update
about 1 year ago 430 pass - last update
about 1 year ago 431 pass - 🇺🇸United States krisahil
I confirmed that this change dramatically decreased the number of those cache_discovery update queries for 'patternkit.library_namespaces' (from 497 down to 1). This was tested on a small site with Patternkit 1.0-beta7.
- last update
about 1 year ago 432 pass - 🇮🇳India minsharm India
Retested the issue with this new patch → and below are the results.
Steps to retest
- Install Drupal with the standard profile
- Enable the patternkit and patternkit_example modules
- Enable query logging in your database
- Clear all caches: drush cr
- Clear the query log for clarity (truncate if using a table, or empty the contents if logging to a file)
- Load any page in the browser
- Count the number of instances of the below query in the log:
SELECT * FROM mysql.general_log WHERE argument LIKE 'UPDATE "cache_discovery" SET "expire"=%' AND argument LIKE '%WHERE "cid" IN (\'patternkit.library_namespaces\')%';
Before Fix : Previously, with every value update in memory, the cache was being invalidated, resulting in an excessively high number of instances being logged.
Latest Results with this new patch
The logging has been successfully reduced from approximately 250 instances to 1. This is a significant improvement. After applying the latest patch, it's observed that regardless of how many nodes are viewed,the count is consistently one in the database.Note : Tested on both D9 as well as on D10.
Attaching Sceenshots.
- Status changed to RTBC
about 1 year ago 2:45pm 14 December 2023 - last update
about 1 year ago 432 pass - Status changed to Fixed
about 1 year ago 2:46pm 14 December 2023 - 🇺🇸United States slucero Arkansas
Merged for inclusion in the beta 8 release.
Automatically closed - issue fixed for 2 weeks with no activity.