I have been trying various caching schemes and this seems uniquely promising in some respects.

Server = CentOS. Web Server = Lighty. 1.4.22. Xcache=1.3.0. PHP=5.2.6

$conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';

$conf['cacherouter'] = array(
  'default' => array(
    'engine' => 'xcache',               // apc, memcache, db, file, eacc or xcache
    'server' => array(),             // memcached (host:port, e..g, 'localhost:11211')
    'shared' => TRUE,                // memcached shared single process
    'prefix' => '',                  // cache key prefix (for multiple sites)
    'path' => 'files/filecache',     // file engine cache location
    'static' => FALSE,               // static array cache (advanced)
  ),
);

Here's the problem. Drupal cannot make up its "mind" whether I am logged in or not. From the front page I am getting the anonymous menus and a "login" link. If I click on the login link I get a 401 BUT I am now logged in.

What is it that I neglected to do?

Comments

Jonah Ellison’s picture

Does it work when the database is used instead of the XCache engine? (Try commenting out $conf['cacherouter'] to test.) Let me know... if it doesn't work with the database, then there might be an issue with session cookies. If it does work, then something is going on with XCache.

Also, since you are using lighttpd, is your max-procs set at 1? (http://redmine.lighttpd.net/wiki/lighttpd/FrequentlyAskedQuestions#How-m...)

ezra-g’s picture

Flying Drupalist’s picture

Subscribe

Canadaka’s picture

Version: 6.x-1.0-rc1 » 6.x-1.0-rc2

I'm running into caching problems, where logged in users will sometimes be given a cached page of another user or even as admin.

I'm noticing some other strange things with it. I have boost enabled and I had thousands of boost cached files in the /cache folder, so i wiped it clean. I wanted to check if anything was every generated while browsing the site as admin or any authenticated user. Nothing is, which is what should be the case. But still if I view some random pages then logout and view those same pages as a guest i am loaded a cached page showing me as logged in with the admin menu at the top. But the strange thing is I can try viewing the same page in a different browser (chrome vs firefox) and then the page loads fine.

If i clear the browsers cache then refresh a page that is loading as if I were an admin, then it reloads to what it should be. Something weird is going on.

here are the headers responses for 3 different pageload types:

###### page loading as if I was logged in as admin (as guest) #######

Cache-Control: store, no-cache, must-revalidate,post-check=0, pre-check=0
Content-Type: text/html; charset=utf-8
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Thu, 08 Apr 2010 07:46:13 GMT
Server: Microsoft-IIS/7.0
X-Powered-By: PHP/5.2.13
Date: Thu, 08 Apr 2010 08:12:39 GMT
Content-Length: 61516
Accept-Ranges: bytes

200 OK

###### NON BOOST CACHED PAGE (as guest) #######

Content-Type: text/html
Last-Modified: Thu, 08 Apr 2010 08:12:47 GMT
Accept-Ranges: bytes
Etag: "0f51346f3d6ca1:0"
Server: Microsoft-IIS/7.0
Date: Thu, 08 Apr 2010 08:12:52 GMT
Content-Length: 16058

200 OK

###### BOOST CACHED PAGE (as guest) #######

Content-Type: text/html
Content-Encoding: gzip
Last-Modified: Thu, 08 Apr 2010 08:12:45 GMT
Accept-Ranges: bytes
Etag: "80bc9c44f3d6ca1:0"
Vary: Accept-Encoding
Server: Microsoft-IIS/7.0
Date: Thu, 08 Apr 2010 08:13:02 GMT
Content-Length: 5102

200 OK

So after further testing it seems the problem is likely related to the "authcache" module and not the "boost" module. If i disable the authcache module but keep boost enabled, the problem is gone.

_paul_meta’s picture

I had similar issues with boost - mainly in firefox ... the solution posted here helped me, might help here too.

http://drupal.org/node/770774

simg’s picture

Status: Active » Closed (fixed)