function testForgetCache() { $this->testRemotefileContents(); $this->assertEqual(file_exists($this->tmpfile), true); binarypool_fileobject::forgetCache('http://staticlocal.ch/images/logo.gif'); $this->assertEqual(file_exists($this->tmpfile), false); $this->assertEqual(file_exists(dirname($this->tmpfile)), false); }
protected function writeSymlink($target, $link) { // Remove the HTTP cache $url = $this->absolutize($link); binarypool_fileobject::forgetCache($url); $json = json_encode(array('link' => $target, 'mtime' => $this->time)); $s3_bucket = $this->cfg['bucket']; $this->removeCache($link); $this->flushCache($link); return $this->client->putObject($json, $s3_bucket, $link, S3::ACL_PUBLIC_READ, array(), 'application/x-symlink'); }