Project

General

Profile

Actions

Bug #34093

closed

Authorizer cache loads all permitted resources to memory

Added by Tomer Brisker almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #33585: Puma memory usage after update to 2.5ClosedActions
Actions

Also available in: Atom PDF