开发者

What in the world is my Memcache host?

开发者 https://www.devze.com 2022-12-20 17:36 出处:网络
What in the heck do you put as the host for Memcache::addServer($host, $port)? I am hosting on mediatemple and this is really, really, really, really starting to get to me.

What in the heck do you put as the host for Memcache::addServer($host, $port)?

I am hosting on mediatemple and this is really, really, really, really starting to get to me.

Do I have to set up a new memcahce server or what. I have no idea what to do and every tut just keeps saying "localhost". Well I don't want to run it on my localhost.... I guess I just don't understand开发者_开发知识库 what's going on.

Any help would be greatly appreciated.


"localhost" is whatever machine the code is running on. If the code is running on a server at MediaTemple, then "localhost" will be that server.

If they provide a memcache server, they should provide it's address somewhere in their knowledge base. Try "localhost" first, on the off chance that it's running on the same machine your site is hosted on.

UPDATE

Assuming you're running on their Grid service, try following these instructions: http://kb.mediatemple.net/questions/854/Using+memcached+with+Django+or+Ruby+on+Rails+in+a+(gc)+GridContainer


Memcached is a service that provides access to a centralized RAM store which would enable caching for your application. Its default port is 11211. If your application requires it then it sounds like you will need access to one.

Most of the time though it's only used for caching and not having it means it will access your database for every request which can degrade your performance significantly depending on your scenario.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号