is memcache relative to database

85 Views Asked by At

I have been browsing through a lot of websites. I need experts advice on this one. can anyone please explain me what exactly is memcache ?

From what I understand that it is a distributed memory caching system used for dynamic web apps but my main question is do we need a database when we say 'memcache' or the term 'memcache' doesnt need a database ?

please answer. Thank you

2

There are 2 best solutions below

0
On

No, you don't require a traditional database when you say memcache, it's an in memory hash table(dictionary) with key,value storage and so it resides in RAM as a lookup table.For this fact, it is not persistent, so whenever you restart your server, memcache gets reset.

0
On

memcached is a specific program that runs a server that other programs can use to keep things in memory. It's something like an in-memory database, depending on your definition of database.

Caching something in memory can also be done generically, without memcached (pronounced memcache dee).