Commit a6a1ca8b authored by Jeremy's avatar Jeremy Committed by Jeremy

Issue #2335727 by wodenx, Jeremy: Setting $cache->created with msec precision borks page caching

parent 35e47785
...@@ -176,13 +176,14 @@ class MemCacheDrupal implements DrupalCacheInterface { ...@@ -176,13 +176,14 @@ class MemCacheDrupal implements DrupalCacheInterface {
* Implements DrupalCacheInterface::set(). * Implements DrupalCacheInterface::set().
*/ */
public function set($cid, $data, $expire = CACHE_PERMANENT) { public function set($cid, $data, $expire = CACHE_PERMANENT) {
$created = round(microtime(TRUE), 3); $created_microtime = round(microtime(TRUE), 3);
// Create new cache object. // Create new cache object.
$cache = new stdClass(); $cache = new stdClass();
$cache->cid = $cid; $cache->cid = $cid;
$cache->data = is_object($data) ? clone $data : $data; $cache->data = is_object($data) ? clone $data : $data;
$cache->created = $created; $cache->created = REQUEST_TIME;
$cache->created_microtime = $created_microtime;
// Record the previous number of wildcard flushes affecting our cid. // Record the previous number of wildcard flushes affecting our cid.
$cache->flushes = $this->wildcardFlushes($cid); $cache->flushes = $this->wildcardFlushes($cid);
if ($expire == CACHE_TEMPORARY) { if ($expire == CACHE_TEMPORARY) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment