Index: memcache.db.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/memcache/memcache.db.inc,v
retrieving revision 1.3
diff -u -p -r1.3 memcache.db.inc
--- memcache.db.inc     22 May 2007 08:58:15 -0000      1.3
+++ memcache.db.inc     24 Jun 2007 14:58:16 -0000
@@ -119,7 +119,7 @@ function cache_set($cid, $table = 'cache
   // Create new cache object.
   $cache = new stdClass;
   $cache->cid = $cid;
-  $cache->data = $data;
+  $cache->data = is_object($data) ? drupal_clone($data) : $data;
   $cache->created = time();
   $cache->expire = $expire;
   $cache->headers = $headers;

