Question

I have two servers running on one physical machine: Apache (for SSL) and Lighttpd (for static content and some non-SSL pages). Both servers generate cache and store it with APC. There are some common entries, which are then stored twice in the memory of one machine. I understand that sharing APC data across two physical servers is impossible, however, here there is only one server. Is there a way around it? Is there a module/plugin that can do that?

Was it helpful?

Solution

You can't - at least, not without some major reorganization. APC cannot share its cache outside the process, so the only way to share the cache would be to have both Apache and Lighttpd use the same pool of PHP worker processes. This is possible, but would involve some major reconfiguration, particularly for Apache.

A much better option will be to use a separate service - like memcached - for caching.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top