Saturday, July 22, 2017

Redis Tutorial for Beginners 6 - more commands (SETEX, SETNX, INCR, DECR...





SETEX key seconds value

Sets the value with the expiry of a key



SETNX key value

Sets the value of a key, only if the key does not exist



SETRANGE key offset value

Overwrites the part of a string at the key starting at the specified offset



STRLEN key

Gets the length of the value stored in a key



MSET key value [key value ...]

Sets multiple keys to multiple values



MSETNX key value [key value ...]

Sets multiple keys to multiple values, only if none of the keys exist



PSETEX key milliseconds value

Sets the value and expiration in milliseconds of a key



INCR key

Increments the integer value of a key by one



INCRBY key increment

Increments the integer value of a key by the given amount



INCRBYFLOAT key increment

Increments the float value of a key by the given amount



DECR key

Decrements the integer value of a key by one



DECRBY key decrement

Decrements the integer value of a key by the given number



APPEND key value

Appends a value to a key



-------------------------Follow-------------------

My Website - http://www.codebind.com

My Blog - https://goo.gl/Nd2pFn

My Facebook Page - https://goo.gl/eLp2cQ

Google+ - https://goo.gl/lvC5FX

Twitter - https://twitter.com/ProgrammingKnow

Pinterest - https://goo.gl/kCInUp

Text Case Converter - https://goo.gl/pVpcwL

Epoch Timestamp Converter - https://goo.gl/Zedjo5

Decimal - Binary - Hexadecimal Converter - https://goo.gl/rkX3JE

8-bit Checksum Calculator - https://goo.gl/inxvIT

Redis Tutorial for Beginners 5 - Redis strings commands





1 SET key value

This command sets the value at the specified key.



2 GET key

Gets the value of a key.



3      DEL key

This command deletes the key, if it exists.



4 FLUSHALL

Delete all the keys of all the existing databases, not just the currently selected one.



5 KEYS pattern

Returns all keys matching pattern.



-------------------------Follow-------------------

My Website - http://www.codebind.com

My Blog - https://goo.gl/Nd2pFn

My Facebook Page - https://goo.gl/eLp2cQ

Google+ - https://goo.gl/lvC5FX

Twitter - https://twitter.com/ProgrammingKnow

Pinterest - https://goo.gl/kCInUp

Text Case Converter - https://goo.gl/pVpcwL

Epoch Timestamp Converter - https://goo.gl/Zedjo5

Decimal - Binary - Hexadecimal Converter - https://goo.gl/rkX3JE

8-bit Checksum Calculator - https://goo.gl/inxvIT

Tuesday, July 18, 2017

Redis Tutorial for Beginners 3 - How To Install Redis On Ubuntu Linux





There are two ways to install Redis under Ubuntu Linux



1. usind apt-get install

----------------------------------------------------

$ sudo apt-get install redis-server



2 with followind commands:

-------------------------------------------------------------

$ sudo apt-get update

$ sudo apt-get install build-essential tcl

$ mkdir redis && cd redis

$ wget http://download.redis.io/releases/redis-4.0.0.tar.gz

$ tar xzf redis-4.0.0.tar.gz

$ cd redis-4.0.0

$ make

$ make test

$ sudo make install



-------------------------Follow-------------------

My Website - http://www.codebind.com

My Blog - https://goo.gl/Nd2pFn

My Facebook Page - https://goo.gl/eLp2cQ

Google+ - https://goo.gl/lvC5FX

Twitter - https://twitter.com/ProgrammingKnow

Pinterest - https://goo.gl/kCInUp

Text Case Converter - https://goo.gl/pVpcwL

Epoch Timestamp Converter - https://goo.gl/Zedjo5

Decimal - Binary - Hexadecimal Converter - https://goo.gl/rkX3JE

8-bit Checksum Calculator - https://goo.gl/inxvIT

Sunday, July 16, 2017

Redis Tutorial for Beginners 1 - How To Install Redis On Windows





There are two ways to install Redis under Windows



1. Download the latest Redis .msi file from

https://github.com/MSOpenTech/redis/releases

and install it.



2. You can choose either from these sources



https://github.com/MSOpenTech/redis/releases or

https://github.com/rgl/redis/downloads

Personally I prepared the first option

- Download Redis-x64-2.8.2104.zip

- Extract the zip to prepared directory

- run redis-server.exe

- then run redis-cli.exe



-------------------------Follow-------------------

My Website - http://www.codebind.com

My Blog - https://goo.gl/Nd2pFn

My Facebook Page - https://goo.gl/eLp2cQ

Google+ - https://goo.gl/lvC5FX

Twitter - https://twitter.com/ProgrammingKnow

Pinterest - https://goo.gl/kCInUp

Text Case Converter - https://goo.gl/pVpcwL

Epoch Timestamp Converter - https://goo.gl/Zedjo5

Decimal - Binary - Hexadecimal Converter - https://goo.gl/rkX3JE

8-bit Checksum Calculator - https://goo.gl/inxvIT

Redis Tutorial for Beginners 1 - Introduction







Redis is an open source, BSD licensed, advanced in-memory key-value store where keys can contain data structures such as strings,

 hashes, lists, sets, and sorted sets. Redis Can be used as Database, a Caching layer or a Message broker.

Following in the footsteps of other NoSQL databases,  such as Cassandra, CouchDB, and MongoDB, Redis allows the user to store vast amounts of data without the limits of a relational database.

 

 History - In Early 2009 - Salvatore Sanfilippo, an Italian developer,

 started the Redis project.At that time. He was working on a real-time web analytics solution and found that MySQL could not provide

 the necessary performance. June 2009 - Redis was deployed

 in production for the LLOOGG real-time web analytics website

 March 2010 - VMWare hired Sanfilippo to work  full-time on Redis (remains BSD licensed) Subsequently,  VMWare hired Pieter Noordhuis, a major Redis contributor, to assist on the project.



-------------------------Follow-------------------

My Website - http://www.codebind.com

My Blog - https://goo.gl/Nd2pFn

My Facebook Page - https://goo.gl/eLp2cQ

Google+ - https://goo.gl/lvC5FX

Twitter - https://twitter.com/ProgrammingKnow

Pinterest - https://goo.gl/kCInUp

Text Case Converter - https://goo.gl/pVpcwL

Epoch Timestamp Converter - https://goo.gl/Zedjo5

Decimal - Binary - Hexadecimal Converter - https://goo.gl/rkX3JE

8-bit Checksum Calculator - https://goo.gl/inxvIT