Forum Moderators: coopster

Message Too Old, No Replies

Help with the APC cache

in need of enlightenment!

         

FourDegreez

1:08 pm on Apr 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



APC seems to behave in very counter-intuitive ways and the documentation is terrible. I'm trying to get the hang of the user cache functions (apc_store, apc_fetch). Using the apc.php file that comes with APC, I can see what entries are in the cache. One thing I notice is that expired entries remain in the cache until they are fetched, at which time they are deleted. It seems it could be expired for days, but hangs around until a fetch. To me, this is unexpected behavior.

I have one point of major confusion. If I delete an entry through apc.php, it seems that if I apc_store the same entry again it doesn't actually get stored (but only sometimes!). This is driving me crazy. I store "test_entry" for example, then delete it. Now I am unable to store "test_entry" again. It will be there if I fetch it back within the same request, but it won't persist across requests. But once in awhile, it will store properly once more. There seems to be some really strange behavior that I'm not understanding.

I am left wondering how confident I can be that if I store something it is really getting stored. Note that I've given APC more than enough memory so that isn't the issue (83.4% free at the moment).

Finally, the apc.shm_segments which supposedly allows you to configure APC to use multiple segments doesn't work at all.

Has anyone else experienced similar difficulties with APC, and what conclusions did you reach about it?

coopster

8:30 pm on Apr 24, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I've never used the apc functions myself and there doesn't seem to be anybody else here that has either. However, I've heard nothing but good regarding xcache so perhaps you may want to pursue that route instead?

[xcache.lighttpd.net...]

This entry should be of interest to you in particular:
[xcache.lighttpd.net...]

craig1972

12:30 am on Apr 30, 2009 (gmt 0)

10+ Year Member



Why not just install eAccelerator? There's a good discussion on several forums, just google for "xcache eaccelerator comparison".

In our tests we have found both to be comparable in speed boosts (do use one of them, they're both excellent) but eaccelerator is much more accepting of many kinds of php scripts that become buggier with xcache.

YMMV.