Welcome! Log In Create A New Profile

Advanced

How to cache PHP output to Memcahced server by Nginx Transparently

Posted by jkuang 
How to cache PHP output to Memcahced server by Nginx Transparently
August 16, 2010 11:20AM
Hi,

I have set up for NginxHttpMemcachedModule and it works great reading output that I have set to Memcached server through my OWN PHP code. But that means I have to modify my PHP code to make it happens and sometimes it is not easy if the code is third party. I really think it would be more beneficial if the NginxHttpMemModule could automatically set the PHP output into Memcached server. By doing so, I don't have to modify PHP code to make it happen and it offers much better maintenance, using Nginx server as the Memcache (cluster) Proxy.

Basically I need to be able to read PHP output from Memcached server:

1) If there is PHP output in the Memcached server given $uri
2) If not, use fallback to the fastcgi or PHP-FPM
3) The generated PHP output of step 2 is set to the Memcached server BY NGINX TRANSPARENTLY (no PHP code change but just Nginx configuration) to the Memcached server so it can be read next time on step 1.

I notice that there is another module call NginxHttpMemcModule. It seems that it could do the trick but I am not sure by looking at the configuration example in the wiki.

Could someone provide some insight on this issue?

Thanks!
-- Jin Kuang
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 245
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready