Ignoring Server Down Error Message when using Yii CMemCache

给你一囗甜甜゛ 提交于 2019-12-25 07:22:24

问题


I've enabling yii memcached, How do I ignoring this error when dedicated memcached server was down.

MemcachePool::get(): Server 192.168.1.200 (tcp 11211, udp 0) failed with: No connection could be made because the target machine actively refused it. (10061)

Thanks,


回答1:


You could:

  1. extend CMemCache as your own caching component
  2. override the getters and setters to return false if no connection is present or connection isn't active, otherwise call the parent:: equivalent method (with any necessary parameters passed)
  3. configure the application component cache to use your newly extended version of CMemCache


来源:https://stackoverflow.com/questions/15779167/ignoring-server-down-error-message-when-using-yii-cmemcache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!