문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top