PHPcachetool清除APC_opcode缓存库
namespace CacheTool;
use CacheTool\Code;
class CodeTest extends \PHPUnit_Framework_TestCase
{
public function testFactory()
{
$code = Code::fromString('return true;');
$this->assertSame('return true;', $code->getCode());
}
public function testAddStatement()
{
$code = new Code();
$code->addStatement('$a = 10;');
$this->assertSame('$a = 10;', $code->getCode());
$code->addStatement('return $a;');
$this->assertSame("\$a = 10;\nreturn \$a;", $code->getCode());
}
public function testWriteTo()
{
php缓存技术是在开发过程中非常的常用和重要,缓存技术可减轻服务器负载、降低网络拥塞、增强www可扩展性,其基本思想是利用客户访问的时间局部性,将客户访问过的内容在Cache中存放一个副本,当该内容下次被访问时,不必连接到驻留网站,而是由Cache中保留的副本提供。PHPcachetool清除APC_opcode缓存库就是这么一个库。
申明:php中文网下载站匠心打造专业的IT资源下载站!一切资源免费,来源网络收集,请自行检测软件的完整性。交流QQ群:916808767