Questions about APC.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Questions about APC.

Post by kaisellgren »

Hi,

Is there a way I could determine how many bytes of data can I cache:

Code: Select all

apc_store('foo', $bar);
More over, is that cache shared with other processes or customers on shared hosting?

One more question, what happens if the limit of bytes has exceeded for the cache? The apc_store() returns a false?
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: Questions about APC.

Post by Mark Baker »

kaisellgren wrote:Is there a way I could determine how many bytes of data can I cache:
apc_sma_info() will return the available memory for each segment
kaisellgren wrote:More over, is that cache shared with other processes or customers on shared hosting?
Cache is shared across all customers that share the same web server.
kaisellgren wrote:One more question, what happens if the limit of bytes has exceeded for the cache? The apc_store() returns a false?
Haven't tried, but I'm always careful about TTL for cache entries, and explicitly clear down anything that I no longer intend to use
Post Reply