- Issue created by @slucero
- Status changed to Needs review
7 months ago 7:56pm 7 December 2023 - last update
7 months ago Patch Failed to Apply - Merge request !91Only invalidate the namespace cache once per request. β (Merged) created by slucero
- last update
7 months ago 430 pass - last update
7 months 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
7 months ago 432 pass 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
7 months ago 2:45pm 14 December 2023 - last update
7 months ago 432 pass -
slucero β
committed 64c16f5d on 9.1.x
Issue #3406874 by slucero, minsharm, krisahil: Cache Rebuild Triggers...
-
slucero β
committed 64c16f5d on 9.1.x
- Status changed to Fixed
7 months 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.