Thanks, Chris, and everyone else that responded.
I finally got proper caching going with Cache_Lite (by 'proper' I mean
that it takes the user into account).
For anyone who's interested, I did the following:
a) extended Dispatcher in index.php to MyDispatcher, and overrode the
_invoke method
b) the _invoke method creates a Cache_Lite object as follows:
$options = //...
$cache = new Cache_Lite($options);
$session = // $_SESSION without $_SESSION['Config']
$key = md5(
serialize($session).
serialize($_POST).
serialize($_GET).
serialize($_COOKIE).
$_SERVER['REQUEST_URI']
);
if ($data = $cache->get($key))
{
echo $data;
}
else
{
// start output buffer
parent::_invoke(...);
// end output buffer and write to cache
}
c) changed the dispatch() call at the bottom of index.php to call
MyDispatcher->dispatch().
Hope this helps someone.
- Neil
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---