php yac windows下载,Yac

软件简介

Yac 是为PHP实现的一个基于共享内存, 无锁的内容Cache

Yac的两个应用场景:

1.让PHP进程之间共享一些简单的数据

2.高效地缓存一些页面结果

假设PHP以PHP-FPM运行,Yac和Pcache缓存的用户内容User Cache就像Opcache一样,保存在PHP-

FPM占用的内存中,下一次脚本可以直接从PHP-FPM中读取数据,httpd_mod-

php同理,而Memcached/Redis需要通过网络(端口)才能访问数据.简而言之,PHP加上Yac和Pcache这些PECL扩展后,自身就是一个K/V缓存系统,用起来很方便.

要求:PHP 5.2 +

安装:

$/path/to/phpize

$./configure --with-php-config=/path/to/php-config

$make && make install

限制:

缓存的键长度不超过 48 字节

缓存值不能超过 60 兆字节

压缩后的缓存值不能超过 1M

示例代码:

set("foo", "bar");

$yac->set(

array(

"dummy" => "foo",

"dummy2" => "foo",

)

);

?>

Yac::get(array|string $key)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
帮我优化一下这段代码(select uuid() as id , a.customerCode as customerCode , a.customerName as customerName , a.unifiedSocialCreditCode as unifiedSocialCreditCode , a.firstInsuranceCode as firstInsuranceCode , a.firstInsuranceName as firstInsuranceName , a.firstRiskCode as firstRiskCode , a.firstRiskName as firstRiskName , a.secondRiskCode as secondRiskCode, a.secondRiskName as secondRiskName, cast(a.secondRiskBasicScore as DECIMAL(6,2)) as secondRiskBasicScore , cast(a.secondRiskBasicScore as DECIMAL(6,2)) as secondRiskScore , to_date(date_add(now(),-1)) as createDate from ( select a.customerCode, a.customerName, a.unifiedSocialCreditCode,'ALL' AS firstInsuranceCode,'全险种' AS firstInsuranceName,c.firstRiskCode,c.firstRiskName,c.secondRiskCode,c.secondRiskName, sum((case when (a.POLICYSTATUS = 'A') then a.sumAssured when (a.POLICYSTATUS = 'B') then (a.PAYOUT+a.OUTSTANDING) else a.sumAssured end) / b.AllcustomersumAssured * c.secondRiskScore) as secondRiskBasicScore from ccic_fkyjrisk.FocusCustomerPolicyData a join ccic_fkyjrisk_orig.InsuranceProductGroup d on d.scoreCardType='0' and a.insuranceCode = d.insuranceCode join ccic_fkyjrisk.PolicyRiskSecondScore c on a.customerCode = c.customerCode and a.policycode=c.policycode and firstRiskCode = '002' join ccic_fkyjrisk.TargetcustomerRanking b on b.firstInsuranceCode ='ALL' and a.customerCode = b.customerCode where (case when (a.POLICYSTATUS = 'A') then a.sumAssured when (a.POLICYSTATUS = 'B') then (a.PAYOUT+a.OUTSTANDING) else a.sumAssured end)>0 and length(nvl(cast((case when (a.POLICYSTATUS = 'A') then a.sumAssured when (a.POLICYSTATUS = 'B') then (a.PAYOUT+a.OUTSTANDING) else a.sumAssured end) as string),''))>0 and (a.firstInsuranceName!='健康险' and a.insuranceCode not in('5IE','5VA','5XA','5XC','5XE','EFD','EFM','EFW','EGB','EGM', 'EGZ','EIA','EIB','EIE','EIF','EIH','EIZ','ERQ','ERW','ERY','ERZ','ESZ','ETB','ETC', 'ETR','ETX','ETZ','EVA','EVB','EXA','EXB','EXE','EYM','4DJ','EGD','5GD','ZCJ','ZCF') and a.secondInsuranceName not in('家庭财产保险','农业保险') and a.insuranceCode not like 'YEE%' and a.insuranceCode not like 'YAC%') group by a.customerCode, a.customerName, a.unifiedSocialCreditCode,c.firstRiskCode,c.firstRiskName,c.secondRiskCode,c.secondRiskName) a;)
06-08

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值