Hi,

I installed Authcache, added this "$conf['cache_backends'][] = 'sites/all/modules/authcache/authcache.inc';" to setting.php and place some code to common.inc

elseif (isset($page_callback_result)) {
  // Print anything besides a menu constant, assuming it's not NULL or
  // undefined.
  global $final_buffer; //TODO: this code should probably be a hook ?
  $final_buffer = drupal_render_page($page_callback_result); // save the final output for potential caching later
  print $final_buffer;
}

I did not modify my theme because I did not find any documentation.

Then I enabled authcache roles (/admin/config/development/performance/authcache). It seems that nothing is cached because it still takes from 700ms to 1.5ms to load a page.

How can I verify whether my pages are being cached?

Thank you, Martin.

CommentFileSizeAuthor
#8 authcache.zip324.81 KBsimg
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

karljohann’s picture

The documentation is under "Read documentation"

simg’s picture

Did you enable filecache or memcache as "back end" caches ?

Canadaka’s picture

I also can't seem to get Authcache to work with Drupal7. Page render/memory/query stats don't change after installing Authcache and enabling it for all roles. I applied the hack to common.inc and here is my settings.php info

$conf['cache_backends'][] = 'sites/all/modules/contrib/memcache/memcache.inc';
$conf['cache_backends'][] = 'sites/all/modules/contrib/authcache/authcache.inc';
$conf['cache_class_cache_page'] = 'MemCacheDrupal';

$conf['memcache_servers']  = array('127.0.0.1:11211' => 'default');
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['memcache_key_prefix'] = 'tf';
$conf['memcache_bins'] = array('cache' => 'default');

Also no debug info is ever shown even though I have it selected.

simg’s picture

@Canadaka - silly question, but have to ask -> do you have memcached installed / running / working?

Canadaka’s picture

yes it is, I can see memcache is working using the "admin/reports/memcache" page. I also can tell because all the MySQL cache tables are empty.

simg’s picture

Status: Active » Closed (fixed)

Apologies I've been away from Authcache for a while but am now back on the case.

The latest dev version contains quite a few fixes and improvements.

1. Previously, authcache was hard coded to not cache for the admin user (ie uid 1). This has caught a number of people out (including me). If authcache doesn't appear to work for you, this is most likely the reason. I've removed this hard coded restriction in favour of using the role based enabling functionality.

2. I've improved the Authcache debug feature so that a) it works all (more?) of the time and b) if the page is not cacheable for any reason, the reason is shown is the debug "dialog".

3. A few minor documentation changes to fill in a few gaps and make it easier for beginners

I have some free time over the next few days, so I should be able to respond to questions / issues and we can push Authcache D7 forward. Bear in mind, I'm somewhat new to Authcache, I haven't even used Authcache D6 so I'm reliant on feedback from the community to tell me what doesn't work. Constructive criticism very welcome :)

I'm closing this issue to make the issue queue more manageable (and I think the latest updates will fix the issue). Please re-open if there is still a problem.

Canadaka’s picture

i installed the latest Authcache dev and it doesn't work, when trying to save the settings in the authcache config drupal says "The form has become outdated.".

In fact I can no longer submit any form in drupal. I rolled back to the older dev version and the issue goes away.

simg’s picture

FileSize
324.81 KB

> In fact I can no longer submit any form in drupal + "The form has become outdated.".

Hmm, I'm aware of this issue, and it was (should be) fixed this morning (ie should be fixed in the version you had).

Just checked: the fix for this issue is in the code checked into Drupals git repo, but it hasn't yet (7 hours later!?) been included into the dev package :/

I've attached a zip of the latest module code for your convenience