- π¦π·Argentina hanoii π¦π·UTC-3
6 years after the last comment I needed this feature, as I wanted to offload this request to a multisite on with not a huge amount of resources.
Overall I feel it's quite good, I added an install hook, a configuration option and small theme tweaks so that you can see if the data is cached as well as an option to refresh it. See MR !8
- πΊπΈUnited States fizcs3 Omaha, Nebraska; USA
We've had the patch from MR8 running for some time and is seeming good, currently applying to Drupal 10.2.7 with Coffee 8.x-1.4.
Help to performance so that the system is not unnecessarily scouring the site for all admin link options every time.
Thank you @hanoii - Status changed to Needs work
about 1 month ago 1:41am 8 November 2024 - π«π·France dqd London | N.Y.C | Paris | Hamburg | Berlin
Bump this to Major regarding the improvement stated in #17 π Local Storage for Coffee Needs review "Help to performance so that the system is not unnecessarily scouring the site for all admin link options every time."
Maybe needs a reroll or new branch to sync MR with π Automated Drupal 11 compatibility fixes for coffee RTBC for possible upcoming Coffee Drupal 11 release.
- π¬π§United Kingdom catch
Just (re-)discovered this in π Add performance testing Active .
Given that Coffee is activated by a link or keyboard shortcut, could the AJAX request not be deferred to then? If it's in local storage it should be instant, but it would help in the non-cached case and potentially also help with browser memory usage given the data structure wouldn't be loaded on most requests then.
On the approach here, I think it would make sense to key the local storage key by Drupal core version and/or $settings['deployment_identifier'] or possibly something added to Drupal settings that is based on a hash of the menus being fetched - could be written to state on menu link rebuild or similar. That would allow for a longer TTL then, or possibly even hard-coding the TTL if it's reliable enough. Core's toolbar module has similar logic to do a similar-ish thing.
- π¬π§United Kingdom catch
Postponing this on π Implement caching mechanism Active and π Get coffee data only when the search box is opened Active - those can be done without complex complex cache invalidation logic (or cache staleness bugs), and should make this less necessary. If it's still necessary after those, then dynamic_page_cache support would allow for a short TTL here without much impact on server load.
- πΊπΈUnited States phenaproxima Massachusetts
π Get coffee data only when the search box is opened Active got in.