Route, Post and CMemCache Hints Required!

Hi all!

This is my first Topic ( I started using yii last week )

Sorry for make 3 questions in only one Topic but i think it will be easy for you.

  1. ROUTE

Hou can i change from :


  1. POST

Is there a way to make a http ‘post’ to an action?

I’m requesting via POST to 

and get an error.


I’m using memcache, i have all configurated and i am using with php like this:

        $memcache = new Memcache;

        $memcache->connect('localhost', 11211) or die ("Could not connect");

        $CardsCubsObj = $memcache->get('cardinals_cubs');

but i want to use it via Yii, I’ve configurated main.php properly. How can I invoque “CMemCache”?

I want to do something like:

$cache = new CMemCache // with all configurated servers


Thank in advance.

Eduardo Leiva


post: yes you can POST to an action, what is the error? maybe actionTest is not set on SiteController? What is the error?

memcache: Then you can use your cache:


route: perfect!

post: Always return the default page configurated in config.php.

( i’m using SOAPUi to test )

memcache: I am already using memcache (is working with actual code), but when i try:



my config file:















It seems that when you set its useMemcached= true, Yii will return an instance of MemCached ( )

public function getMemCache()



        return $this->_cache;


        return $this->_cache=$this->useMemcached ? new Memcached : new Memcache;


That means, that you need to include the file where Memcached is in order to create an instance at any place in the code. The __autoload is failing to include the file… this is the actual error.

About the other problem, have you tried including index.php in your request?