Skip to content
Snippets Groups Projects
Commit a6a1ca8b authored by Jeremy Andrews's avatar Jeremy Andrews Committed by Jeremy Andrews
Browse files

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

parent 35e47785
No related branches found
Tags 7.x-1.4-beta1
No related merge requests found
......@@ -176,13 +176,14 @@ class MemCacheDrupal implements DrupalCacheInterface {
* Implements DrupalCacheInterface::set().
*/
public function set($cid, $data, $expire = CACHE_PERMANENT) {
$created = round(microtime(TRUE), 3);
$created_microtime = round(microtime(TRUE), 3);
// Create new cache object.
$cache = new stdClass();
$cache->cid = $cid;
$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.
$cache->flushes = $this->wildcardFlushes($cid);
if ($expire == CACHE_TEMPORARY) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment