Redis Command: INCR
Increase the value stored in
Increase the value stored in
Append the provided string
Set multiple key values if the keys do not already exist. NX represents “Not exists”. This is a very useful command if we want to set multiple key/values only if they do not already exist.
Redis MSET command details, with the Golang, Java, C#, NodeJS, PHP, Python and Ruby examples. Set string values for multiple keys. This is a very handy and useful command when we have a lot of string key/value to set.
Redis GETDEL command details, with examples in Golang, NodeJS, Java, C#, PHP, PYthon, Ruby. Get value and delete the key after that. It works similar to the GET command, just this deletes the key additionaly.
Get the value of the key and additionally set the expiration time for the key. This command can work without the expiration time part, in that case, it will behave like the “GET” command.
Visitor pattern moves the calculation/operation to a separate class. This way, we can define a new operation without changing the related classes. This article demonstrates Visitor pattern implementations in PHP.
Template method pattern defines a template/skeleton for an operation processing steps. The subclasses define some steps of the template/skeleton, and some step definitions can be common for all. This makes it easier for the subclasses to adopt the processing steps defined in the template method pattern. This article demonstrates Template Method pattern implementations in PHP.
Get the string values of multiple keys. As we can pass multiple keys and get the values, so it is a very handy command when we work with lots of keys. This operation always returns values without any fail, as for the non-existing keys it returns nil.
Strategy pattern uses a group of similar algorithms and make those algorithms interchangeable. The client can use any of the algorithms at any given time and also can change the algorithm when needed. The algorithms used in strategy has the same interface implemented, but the internal working is different. This article demonstrates Strategy pattern implementations in PHP.