Key Features of Memcache.
- 1- It's open source.
- Memcache server is a big hash table
- it significantly reduces the database load
- it's perfect for a website which has High Database Load.
- its client-server application over TCP/UDP
How to Install it on Linux,
Sudo apt-get install Memcached
Default Port is - 11211
To connect to the Memcache server you need to use the Telnet command on HOST & PORT
cmd - $telnet HOST PORT
For exp - $ telnet 127.0.0.1 11211
Memcache set command is used to set a new value to a new or existing key.
Command:-
set kEY FLAGS EXPTIME BYTES (noreplay)
Value
- KEY - name of the key
- FLAGS - Its 32-bit unassigned integer that the server stores with the data provided by the user, and returns along with the data during the fetch
- EXPTIME - expiration time in seconds
- BYTES - Length of data(in bytes) which need to store in Memcache
- noreplay - this parameter informs not to send any replay from the server during the set
- VALUE - It is the data that we need to be stored. this we need to pass next line after passing all the above params
OUTPUT :
Stored - indicates success
Error - Indicates incorrect syntex or error while saving data.
Comments
Post a Comment