Support » Plugin: Advanced Access Manager » Access denied unexpectedly when using Redis

  • Resolved MikeNGarrett


    I’m seeing unexpected behavior for a custom role created by our theme and extended by AAM in combination with object cache by Redis. Users with this role (and no user access customization) are blocked from accessing the admin area when attempting to log in. This occurs sporadically. When users are able to log in as this user role, they are blocked from publishing posts. Clearing the AAM object cache seems to clear the issue temporarily. Disabling object cache entirely appears to resolve the issue entirely.

    To me, this feels like the object cache is holding on to access rules for different users and serving them to the wrong user during capabilities checks.

    I’m using the free version of AAM 5.7.1 along with Redis 3.1.6, Predis 1.1.1, PHP 7.2. I’m using the Redis Object Cache plugin version 1.4.1.

Viewing 1 replies (of 1 total)
  • Plugin Author Vasyl Martyniuk


    Hi @mikengarrett,

    Thank you for the message. Honestly I can only hypothetically guess what possibly can be wrong with the way cache is setup for your instance. That is why you would have to do some level of debugging on your own.

    My best assumption will be that your website caches results of database queries and assumes that the same results are produces for all other users. So basically your caching mechanism does not take in consideration the fact that different users may have different set or properties (access settings) returned from database querying.

    So you would have to understand how cache is stored. Does it tight cache per user or no? Do you have multiple levels of caching where some goes to Redis instance and so are stored elsewhere?

    Do some tests. Find patterns. And let me know.


Viewing 1 replies (of 1 total)
  • The topic ‘Access denied unexpectedly when using Redis’ is closed to new replies.