Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache问题 #3

Open
liuchun opened this issue Dec 15, 2016 · 4 comments
Open

cache问题 #3

liuchun opened this issue Dec 15, 2016 · 4 comments

Comments

@liuchun
Copy link

liuchun commented Dec 15, 2016

后台设置数据缓存周期为0时,页面还是取的缓存数据。
跟描述不一致:“前台控制器中使用数据缓存的更新周期(秒),设置为"0"则表示不使用缓存”。

@cigery
Copy link
Contributor

cigery commented Dec 15, 2016

缓存使用的是memcached还是file?
设置为0后,需在后台将全部缓存清理(是否有清理?),我这边测试是设置为0后是不在使用缓存的

@liuchun
Copy link
Author

liuchun commented Dec 18, 2016

使用的是file,全部清理了缓存,仍然有这个问题。
研究了下代码,发现可能是由于vcache.php第64行的判断导致的。
if($expires === 0 || $expires - $_SERVER['REQUEST_TIME'] > 0) return unserialize(base64_decode($data[2]));
不知道我的理解是否正确?

@Liufeiran123
Copy link

Liufeiran123 commented Mar 27, 2017

WARNING: Memcache::setcompressthreshold() [memcache.setcompressthreshold]: No servers added to memcache connection in /data1/www/htdocs/205/xiaohuafen/1/shangcheng/protected/lib/vcache.php on line 17

self::$_instance = new self();
13. if(class_exists('Memcache') && $type == 'memcache')
14. {
15. $mem = new Memcache();
16. if($mem->addServer($_SERVER['SERVER_NAME'], 11211)) self::$_mem = $mem;
17. $mem->setCompressThreshold(20000, 0.2);
18. }
19. }
20. return self::$_instance;
21. }

错误了,提示这个。

@cigery
Copy link
Contributor

cigery commented Mar 28, 2017

这个应该是没有开启Memcached服务

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants