Question

Redis caching with Nginx

I have setup 2 website with droplets <a href=“https://tutorialmeta.com”>tutorialmeta<a/> <a href=“https://coderecharge.com”>coderecharge.com<a/>

They are sharing the same server so is it possible to share Redis caching between them.

Is it possible to use Redis with Nginxwithout invoking PHP means most of the pages will be static so just need to call PHP once and then Redis and Nginx can handle the next call?

For updates on web site, we can clear Redis keys for that URL.

so, somehow is it possible with Nginx and Redis?


Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
August 4, 2022

Hi @hardiksatasiya,

Yes, it’s possible the use Redis with both websites.

As for Redis and Nginx, check out the following page :

https://www.nginx.com/resources/wiki/modules/redis/

It’s an Nginx module that is specifically designed to be used with Redis. You can use this module to perform simple caching.

Having said that, I still think you’ll need to use PHP with Redis. It really depends what you want to do. Will you be using Redis for caching only or will you be storing some data in it as well?