Using memcached to store session data, is it safe?

I have to design a website to fill in some data about books with great automatic completion. Each page has about 1,500 ajax requests per server!

So, I decided to do the bulk of this using the Yii framework and instead of using ajax, Socket.IO from NodeJS for a quicker response.

Now the problem is the synchronization of session data between the two programming languages. Is it safe to use memcached to save it?

I mean saving SESSIONID as the key name in memcached and using JSON for the value. so I can access it through PHP and NodeJS. It is safe?

+4
source share
2 answers

I would not suggest using Memcached. The cache can be canceled at any time and you will lose data. I would recommend you use a solution like Redis .

+4
source

I would not recommend using Memcached for this - as soon as your cache is full, it will begin to delete data and / or if your Memcached server crashes, you will also lose data.

I would recommend using something like Redis or Membase.

+3
source

Source: https://habr.com/ru/post/1442708/


All Articles