2

I'm having a performance crisis with my front page. I have the standard drupal cache enabled which works great for anonymous users, but my front page is practically unusable for logged in users.

The front page doesn't contain any user-specific information, so it would be great if the front page was always cached version for all users.

Actually, there is a user account link in the header which is user-specific, but I'd be willing to forgo that (display as anonymous) for the quick, all-encompassing solution. I'm working on a real caching solution for logged in users, but I'd like a quick fix like this.

  • can you give some more insight into what is on your front page? a list of promoted content? a couple blocks? what could be causing this crisis? each of these elements can be cached but without more details, it's shooting in the dark. – Jimajamma Apr 17 '12 at 20:54
1

AFAIK there is no easy way of getting a cached page as though the user was anonymous.

The easiest solution is probably to cache the elements of the front page, but that's hard to say without knowing how it's built and what's elements it consist of.

  • What about scrubbing the current user early in the bootstrap if the menu callback is the frontpage? I guess this is literally in index.php because that's where the cache request needs to start? – ack Apr 17 '12 at 19:58
  • 1
    @ack Those kind of hacks often leads to backfire. – googletorp Apr 17 '12 at 20:27
  • 1
    Good way to cache various page elements is to use the ESI module drupal.org/project/esi – mikeytown2 Apr 17 '12 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.