diff --git a/includes/cache.inc b/includes/cache.inc
index 8666874..2ba6332 100644
--- a/includes/cache.inc
+++ b/includes/cache.inc
@@ -93,7 +93,7 @@ function cache_get_multiple(array &$cids, $bin = 'cache') {
  *  - cache_menu: Stores the structure of visible navigation menus per page.
  *
  *  - cache_page: Stores generated pages for anonymous users. It is flushed
- *  very often, whenever a page changes, at least for every ode and comment
+ *  very often, whenever a page changes, at least for every node and comment
  *  submission. This is the only bin affected by the page cache setting on
  *  the administrator panel.
  *
@@ -357,8 +357,6 @@ class DrupalDatabaseCache implements DrupalCacheInterface {
    *   The bin being requested.
    */
   protected function garbageCollection() {
-    global $user;
-
     // Garbage collection necessary when enforcing a minimum cache lifetime.
     $cache_flush = variable_get('cache_flush_' . $this->bin, 0);
     if ($cache_flush && ($cache_flush + variable_get('cache_lifetime', 0) <= REQUEST_TIME)) {
@@ -385,7 +383,6 @@ class DrupalDatabaseCache implements DrupalCacheInterface {
    *   valid item to load.
    */
   protected function prepareItem($cache) {
-    global $user;
 
     if (!isset($cache->data)) {
       return FALSE;
@@ -396,7 +393,7 @@ class DrupalDatabaseCache implements DrupalCacheInterface {
     // timer. The cache variable is loaded into the $user object by _drupal_session_read()
     // in session.inc. If the data is permanent or we're not enforcing a minimum
     // cache lifetime always return the cached data.
-    if ($cache->expire != CACHE_PERMANENT && variable_get('cache_lifetime', 0) && $user->cache > $cache->created) {
+    if ($cache->expire != CACHE_PERMANENT && variable_get('cache_lifetime', 0) && (isset($_SESSION['cache'][$this->bin]) && $_SESSION['cache'][$this->bin] > $cache->created)) {
       // This cache data is too old and thus not valid for us, ignore it.
       return FALSE;
     }
@@ -435,15 +432,19 @@ class DrupalDatabaseCache implements DrupalCacheInterface {
   }
 
   function clear($cid = NULL, $wildcard = FALSE) {
-    global $user;
 
     if (empty($cid)) {
       if (variable_get('cache_lifetime', 0)) {
-        // We store the time in the current user's $user->cache variable which
-        // will be saved into the sessions bin by _drupal_session_write(). We then
-        // simulate that the cache was flushed for this user by not returning
-        // cached data that was cached before the timestamp.
-        $user->cache = REQUEST_TIME;
+        // We store the time in the current user's $_SESSION variable which
+        // will be saved into the sessions table by _drupal_session_write(). We
+        // then simulate that the cache was flushed for this user by not
+        // returning cached data that was cached before the timestamp.
+        if (isset($_SESSION['cache'])) {
+          $_SESSION['cache'][$this->bin] = REQUEST_TIME;
+        }
+        else {
+          $_SESSION['cache'] = array($this->bin => REQUEST_TIME);
+        }
 
         $cache_flush = variable_get('cache_flush_' . $this->bin, 0);
         if ($cache_flush == 0) {
diff --git a/includes/session.inc b/includes/session.inc
index 2ede2ff..2c5703e 100644
--- a/includes/session.inc
+++ b/includes/session.inc
@@ -173,7 +173,6 @@ function _drupal_session_write($sid, $value) {
       // Either ssid or sid or both will be added from $key below.
       $fields = array(
         'uid' => $user->uid,
-        'cache' => isset($user->cache) ? $user->cache : 0,
         'hostname' => ip_address(),
         'session' => $value,
         'timestamp' => REQUEST_TIME,
