You have two reasons to use memcache:
1. Unload the database server
That is, if you have a high load on the database server, because you keep querying the same thing over and over, and the mysql internal cache does not work as fast as expected. Or you may have problems with the write performance that binds your server, and then memcache will help you offload mysql in a consistent and better way.
In the event that the server itself is NOT stressed, there can be no advantage to using memcached if it is mainly designed to improve performance. Memcached is still a server, you still need to connect to it and talk to it, so the network aspect is still supported.
2. Share data between users without relying on a database
In another scenario, you can share some data or state between users of your web application without relying on files or on sql server. Using memcached, you can set the value from the user's point of view and download it from another user.
Good examples of this can be chat logs between users, you do not want to store everything in the database, because it makes a lot of records and readings, and you want to share data and do not want to lose everything in case an error occurs, and the server reboots ...
I hope my answer will be satisfactory.
Good luck.
source share