This repository has been archived by the owner on Aug 18, 2024. It is now read-only.
Remove static cache in OgAccess::userAccess()
#654
Milestone
OgAccess::userAccess()
#654
We currently have a static cache in
OgAccess::userAccess()
which adds some considerable complexity but does not seem to be needed. All of the external methods that we are calling that do database queries already have static caches. The only part that is not covered is the alter hook, but it is not our responsibility to provide a caching layer for expensive logic that happens inside an alter hook.I did some digging and it turns out this was added back in 2009 (ref commit 9e8e1e5590) to cache the results from
user_role_permissions()
. Even back then it was not needed, sinceuser_role_permissions()
has its own static cache, right from when it was initially added back in 2008 (ref issue #73874).So it seems this static cache has never served any useful purpose in the whole history of OG. Let's remove it.
The text was updated successfully, but these errors were encountered: