0

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,

Wildan Muhlis
  • 1,553
  • 2
  • 22
  • 43

1 Answers1

0

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
AndrewPK
  • 6,100
  • 3
  • 32
  • 36
  • Thanks Andrew, I'll try it and mark it as answer if success. FYI, I'm newbie in Object-oriented php. – Wildan Muhlis Apr 03 '13 at 22:41
  • Sorry I don't have time to write more of a tutorial. It is a shame this functionality doesn't exist in the current caching application component cache as far as I know. If you're new to all that comes with php 5.3+, you may want to check out a book to keep around as a reference like http://www.amazon.com/Programming-PHP-Kevin-Tatroe/dp/1449392776/ – AndrewPK Apr 04 '13 at 03:40