Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

搜索刷新时间

[复制链接]
p54865 发表于 2005-7-5 15:09:24 | 显示全部楼层 |阅读模式
text搜索刷新时间在程序源代码里面被定为1 个小时

search.php:
$cachelife_text = 3600; // Life span for cache of searching in specified range of full text

然后, 另外一个condition 只让有10% 机会检查刷新时间:

if(substr($timestamp, -1) == '0') // last digit of time in second is 0

结果: 1. 非常长时刻才能刷新 (at leat 1 hour) 2. 结果不是确定的 (only 10% chance when you search)

I know all of these are for performance reasons. I'm thinking of the following changes:

1. check if the last digit of timestamp is even 偶数 (50% hit)
2. shorten cachelife_text to 600 (15 minutes)

Any suggestions?

Thanks.
回复

使用道具 举报

168funpc 发表于 2005-7-6 17:27:17 | 显示全部楼层

太复杂了看不懂

说明刷新限制时间 有bug?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-12-13 22:02 , Processed in 0.097634 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表