This module provides an alternative cache.inc file to serve anonymous page requests from xCache. This module makes use of DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE and implements page_cache_fastpath().
For anonymous users I want to serve pages from XCache, but I didnt want to use memory caching as a replacement for every cache table, only serving cache_page content for anon users from XCache.
Some of the code and concept is inspired by Cache Router, Memcache and XCache however for most parts the code is something I wrote in collaboration with Nick Thompson
The concept
- set a cookie for logged in users (anon/auth flag)
- page_cache_fastpath() checks if cookie is not set
- if cookie is set(auth user): proceed as normal, standard drupal cache functions (no cache)
- if cookie is not set (anon):
-- check if cached page exists in XCache, if it does serve the page
-- if cache doesnt exist in xcache, check db, exists in DB? save it in XCache & serve page
-- page doesnt exist in XCache or DB? Generate page, cache it in DB and Xcache, serve page