Quantcast
Viewing latest article 6
Browse Latest Browse All 26

Personalisation / Custom caching

Hi all,

I want to build a module that handels caching and is able to deal with altering pieces of content based on some variables.

For a client we've developed a D7 site a couple of years back. The site is high-traffic and serves a lot of visitors but only anonymous users. The site uses views, panels and panels everywhere for it's layout, general pagecaching for cache and all media comes from a CDN. Everything works great!

The client wants to take the site to "the next level" and implement personalisation. The site should change pieces of content based on behaviour and data we gathered about the user. This means that pagecaching becomes a problem, but turning it off would immediately kill all servers due to the high traffic (well, Amazon AWS would boot a lot of extra webservers to keep up with demand :) ).

so to re-iterate; I want to build a module that handels caching and is able to deal with altering pieces of content based on some variables.

I've looked into and done tests with panel cache, panel content cache, panel hash cache, etc. to see if i could cache independent panes of content and write a custom CTools cache plugin that would add the necessary checks to the caching and create a couple of versions of cache for a single pane.
But no caching method comes remotely close to just plain ol' page caching (200 - 300 ms). The only thing that does works a bit (roughly 4 - 5 times slower then page caching, arnoud 800 - 1000ms per page) is using panel content cache and caching entire panels (not panes). But this doesn't fit my needs as i'm not able to change the content of a single pane of the panel. Caching single panes comes in at around 2500 - 3000 ms per page.

The other method i researched was altering the drupal page cache to add some custom checks and create different versions for pages based on the user data, but there don't appear to be any hooks that which i can implement to accomplish this.

The only other method which could maybe work is something like Varnish, but i don't have any experience with Varnish so it's hard for me to say for sure.

Has anyone here have an idea how to go about adding in caching in the above situation so the site remains at usable speeds but with alterations in content based on some variables (user data in this case)?

Any help or suggestions are greatly appreciated!


Viewing latest article 6
Browse Latest Browse All 26

Trending Articles