Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Noticed db_table_exists()
was getting called twice from output in devel query log for ECKCache.
Proposed resolution
Static cache the result on the class.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#4 | 2473691-4-eck-stupid_cache_check.patch | 1.11 KB | pounard |
#1 | prevent_eckcache_from-2473691-1.patch | 1.13 KB | joelpittet |
Comments
Comment #1
joelpittetSave every millisecond;)
Comment #2
pounardActually it should never ever try to do any db_table_exists().
Comment #3
pounardAnyway, looking at the code, there is no way the table could not exist, especially if all updates have been run, moreover, some cache backends don't even actually care about having a table or not, my guess is that this check just should be removed.
Comment #4
pounardA live db_table_exists() is a bug, runtime code should never ever do that.
Here is a cleanup patch.
Comment #5
joelpittetThanks I was thinking about that yesterday actually.
Comment #6
eric.napier CreditAttribution: eric.napier at CivicActions commentedfixed.