S
S
Sasha Brahms2015-11-19 21:57:55
PHP
Sasha Brahms, 2015-11-19 21:57:55

Sessions on memcached, redis or sql?

There was a need to rewrite the session mechanism (for complete control over them - deletion, etc.)
But here's the thing, I have not worked with Redis and memcached before, I heard and read about memcached, but still there are ambiguities ..
What is best rewrite and why? I would like to hear your opinion ..
as far as I understand, scoring 300MB of memcache, I take away 300MB of RAM, is this reasonable?
but again, if you do it in sql, each time you access the database, etc. ...
What do you say?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
wellgo, 2015-11-19
@Dlike

You provide a strange choice :) Memcached is volatile, in general RAM-dependent things are usually used as "quick access to resources from SQL", the cache is shorter.
Personally, I store in sql, but the trend is better in noSQL (which one is not important, choose what is best for you in mastering), a response of 4ms or 5ms (exaggerated) will not play a special role.
Plus that you have "partial" control - maybe there is "full" there (on github, for example)

I
IceJOKER, 2015-11-19
@IceJOKER

Are you aware that sessions can be deleted? And it seems to me that you do not know this.
About Redis / Memcached - eax.me/redis

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question