- Issue created by @emacoti
Found that when the ai.admin_providers and the ai.admin_vdb_providers menu links are rendered, like on the admin toolbar, the page cache becomes uncacheable. After some research I found that the access checker for providers and vdb_providers are trying to add user account cache metadata to the result but the user account does not implement the `CacheableDependencyInterface` and so it is just setting max-age to 0. That is making the page cache to become uncacheable.
Enable the ai module and load pages with a user that has permission to render ai menu links. When these menu items are rendered, the page cache should be uncacheable.
The main reason to add user cache metadata at this point is to make the result vary based on user. This can also be achieved by adding the `user.permissions` cache context.
Remove the `addCacheableDependency` for the user account and add the `user.permissions` cache context instead.
Active
1.0
AI Core module