Skip to content

Performance issues from always reading roles from cache #79

Description

@jcart

Using this package that relies strictly on external cache to retrieve the roles, even after they have been retrieved from cache from previous calls.

This negates any possibility of eagerly loading the data from an initial query, in cases where collections are returned, which is very important.

$user = User::with('roles')-get();
$user->hasRole( .. );
$user->hasRole( .. );

This results in 2 cache retrievals from your external cache.

We have in some cases some complex permission schemes within a collection, which results in hundreds of calls to Redis.

An older version of the application does not suffer from this issue, but I'm not clear why you opt'd to always visit the external cache over in memory. See 4860bc0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions