Actions
Bug #34093
closedAuthorizer cache loads all permitted resources to memory
Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
-
Description
The cache saves calculating the scope for the collection, but loads all records when calling `.include?` instead of checking for the existence of the specific record within the scope
def collection_cache_lookup(subject, permission) collection = @cache[subject.class.to_s][permission] ||= find_collection(subject.class, :permission => permission) collection.include?(subject) end
Actions