Using memcache via a socket file?

euantor

Well-known member
I've today bought a second hand license and am just waiting for it to be transferred. I decided to just ask my questions now rather than waiting though as this site seems most active during the night and when I'm at work.

Anyway, what I want to know is whether XenForo allows the use of memcache as a data cache via a socket file? I've had a look at the docs but I couldn't see any mention of it. I also own an IPB license and I know for a fact they don't support socket files.
 
In theory it should work, you would just need to write up the relevent code and add it to your config.php to pass the information on.

The question is, why would you want to do it in such a way?
 
Because I'm on webfaction's shared hosting and the only way I can use caching is by using memcache via a socket or by compiling PHP and everything for a single app - not something I much feel like doing.

EDIT: Just found a guide to installing APC on a PHP 5.3 instance on webfaction. I generally prefer APC so I might see if it'll work. On another note, how well does XF play with PHP 5.4?
 
Because I'm on webfaction's shared hosting and the only way I can use caching is by using memcache via a socket or by compiling PHP and everything for a single app - not something I much feel like doing.

What a strange way of doing things?

Well like I said, in theory, you should be able to add the code you need to pass it onto the socket file into the config.php file...

Don't know if anyone has done that though.
 
What a strange way of doing things?

Well like I said, in theory, you should be able to add the code you need to pass it onto the socket file into the config.php file...

Don't know if anyone has done that though.

Sure is odd, but the rest of the service is great and means I don't have to worry about security and stuff like I did on my VPS. I guess I'll have a try and see what happens once my transfer is complete. Thanks for the help!
 
Memcache shouldn't be used in a single web server setup... It will be slower than using APC or XCache... Memcache is used for multi-server setups (since you are asking about a socket file to connect, I assume it's a single server setup).
 
There was no opcode caching in place as far as I could see. I installed it for all my PHP 5.4 apps on the server (currently an IPB install which is to be converted to xF once my license is transferred) and did notice a pretty significant speed increase. I then set it as the actual variable cache too and there was an even bigger gain. I've never used APC before so I'm pretty surprised at how easy it was to setup.
 
There was no opcode caching in place as far as I could see. I installed it for all my PHP 5.4 apps on the server (currently an IPB install which is to be converted to xF once my license is transferred) and did notice a pretty significant speed increase. I then set it as the actual variable cache too and there was an even bigger gain. I've never used APC before so I'm pretty surprised at how easy it was to setup.

Our host installed APC for us recently and I think loading time went down to about 1/3 of what we were experiencing before, so it's definitely worth it. :)
 
Yeah, if you don't have an opcode cacher installed... well... I don't even know what to say. Because you should. SUCH a massive waste of CPU resources to not.
What is the best solution for a cache with XF? I ask as I'm just about to change over to a ServInt dedicated server, and figure this may not be default installed.

Which is better? APC or Xcache?
 
Top Bottom