Can I use APC?

Status
Not open for further replies.
Messages
89
Reaction score
0
Points
6
I just came across something called Alternative PHP Cache (APC). I liked what I read, especially the fact that it "heavily optimizes and tunes the output of the PHP bytecode compiler and stores the final, compiled result in shared memory" (source: Wikipedia).

I was just wondering if I am allowed to implement it in my x10hosting account.

And if so, how? And what would I be needing? I don't have much idea about installing and using PHP accelerators.


P.S. I found some other threads related to this, but they were either closed or not answered or very old. So I am creating this one.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
Not on Free Hosting (or shared Premium) since you'd need to install binaries and have your memory kept alive for long enough for the caching to matter. You'd need a VPS or a dedicated/colo server to make it work. (In most shared hosting environments you don't "own" any resources, you're just allowed to use them while a request is being processed, so once a request is processed, your memory will be released under most circumstances. You would need to "own" a chunk of memory large enough to hold the bytecode cache.)
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,929
Reaction score
118
Points
63
Furthermore, if APC were to be enabled on a shared environment, this would mean that everybody has access to what you store there via the apc_* functions (and they would also have the ability to overwrite what you store with their own stuff).

The bytecode caching side of it would similarly be not useful, since there are so many different PHP scripts run on the Free Hosting servers that anything saved in the bytecode cache would simply get evicted due to the cache running out of space in a manner of minutes if not seconds -- negating the usefulness of it and quite possibly making your site run slower since it has to constantly re-cache it over and over and over again despite rarely being able to make use of the cached result.
 
Status
Not open for further replies.
Top