Hello,

I have authcache working (it's amazing, thank you!), but it only works if a user has one role. For instance, I set a user to be a staff member, checked it, I can see the authcache debug panel. If I add another role, like editor, to this user, the panel goes away, and the json object no longer shows in the page source.

I thought maybe this was by design until I saw this issue: http://drupal.org/node/737762

Any help or suggestions would be greatly appreciated. Please let me know if you need more information from me.

CentOS 6.3, Apache 2.2.15, PHP 5.3.3, running APC via cacherouter.

Comments

simg’s picture

Hi Fender,

I gave you some duff information about comparing authcache.inc between D6 & D7

Take a look at authcache.helpers.inc (in the module folder).

The first two functions are _authcache_is_cacheable() and _authcache_is_account_cacheable(). More than likely, putting a little bit of debug code within these functions will tell you why the page isn't being cached. (The D7 version of authcache.helpers.inc has this built in).

The 3rd function, _authcache_shutdown_save_page() is where authcache actually does the caching, so a bit more debug in there might help you trace what is happening.

Based on your general politeness :), I did start setting up a D6 enviroment to work on back-porting over the D7 debugging features but I quickly realised there's probably a days work in that ...

See how you get on with the above. What you're trying to do *will* work (though the issue becomes, if you have too many different role combinations, you either need a burdensome cache warming process or you'll get too many cache misses.

fender177’s picture

Hi Simon,

Thanks for the reply! I *just* figured out the issue, and it's quite silly. I had a custom block that I did not update based on your documentation. Once I removed that block, authcache began working for users with multiple roles.

I will take a look at the functions you mentioned above. I might have some time to code some debugging features. If I get them working nicely, I'll send you a copy of what I've done for review and to possibly be committed.

Thanks again for the hard work! It's very much so appreciated.

fender177’s picture

Status: Active » Closed (works as designed)

Issue was a custom block - I need to look at the documentation on blocks.

simg’s picture

Credit where it's due, most of the hard work was done by Jonah Ellison http://drupal.org/user/217669

I "just" updated the module to D7.