private function assertCacheAllowed(WURFL_Storage_Base $cache)
 {
     $config = array("dir" => self::storageDir(), WURFL_Configuration_Config::EXPIRATION => 0);
     $storage = new WURFL_Storage_File($config);
     $uncached_storage = new WURFL_Storage_File($config);
     $this->assertTrue($storage->supportsSecondaryCaching());
     $this->assertTrue($storage->validSecondaryCache($cache));
     $storage->setCacheStorage($cache);
     $storage->save("foo", "foo");
     sleep(1);
     // Make sure it's there
     $this->assertEquals("foo", $storage->load("foo"));
     $cache->clear();
     // Check after cache is empty (fall through to file)
     $this->assertEquals("foo", $storage->load("foo"));
     // Remove underlying files
     $uncached_storage->clear();
     // Check cache without file-backing
     $this->assertEquals("foo", $storage->load("foo"));
     // Clear cache
     $cache->clear();
     $this->assertNull($storage->load("foo"));
 }