Commit b56dfae8 authored by Jeremy's avatar Jeremy

Issue #1863996 by Jeremy: cleanup SESSION variable

parent 348b534b
......@@ -513,17 +513,16 @@ class MemCacheClearCase extends MemcacheTestCase {
// Set a much shorter cache lifetime.
variable_set('cache_content_flush_' . $this->default_bin, 0);
variable_set('cache_lifetime', 1);
cache_set('test_cid_1', $this->default_value, $this->default_bin, time() + 6000);
cache_set('test_cid', $this->default_value, $this->default_bin, time() + 6000);
$this->assertTrue($this->checkCacheExists('test_cid', $this->default_value), 'Cache item was created successfully.');
sleep(2);
cache_clear_all(MEMCACHE_CONTENT_CLEAR, $this->default_bin);
$this->assertFalse($this->checkCacheExists('test_cid', $this->default_value), 'Cache item is not returned once minimum cache lifetime has expired.');
// Reset the cache clear variables.
variable_set('cache_content_flush_' . $this->default_bin, 0);
variable_set('cache_lifetime', 6000);
$_SESSION['cache_flush'][$this->default_bin] = 0;
$this->resetVariables();
sleep(1);
// Confirm that cache_lifetime does not take effect for full bin flushes.
cache_set('test_cid', $this->default_value, $this->default_bin, time() + 6000);
......
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