Redis Command: INCR

Increase the value stored in by One(1). Used when we want to increase some count by one. For example, we want to save- Total number of logged-in users, Number of times the user tries to log in or reset the password, Number of times the user tries to access some resource or API endpoint.

Redis Command: APPEND

Append the provided string to the existing string value of a . If the key does not exist then this command creates the key first with an empty value, then appends the provided value to that empty string. In case the does not exist then the APPEND command behaves like the SET command.

Design Pattern: Template Method Pattern 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.

Design Pattern: Strategy Pattern in PHP

Strategy Pattern

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.