Loading...
 
Skip to main content

History: Redis

Source of version: 4 (current)

Copy to clipboard
            ! {{page}}

Added in ((Tiki20)): Enable connection to Redis to store cache, and improve ((Performance)). This is for advanced users. See also ((Memcached)).

! What Is Redis?
Redis is a data store – like a database, but one that stores data primarily in-memory. This makes it much faster than traditional databases where data is stored in disks. Because of this speed, Redis is often used as a caching tool.
It is an open source key-value data store that can store data in any data type, as it uses a key-value pair system to store data. This is also unlike traditional databases that use documents or rows and most commonly used as a primary database, cache, message broker, and queue. 
Redis cache delivers sub-millisecond response times, enabling fast and powerful real-time applications in industries such as gaming, fintech, ad-tech, social media, healthcare, and IoT.

It has the ability to write data to disk for persistence. You can configure Redis to persist data either periodically or after every command you issue. When Redis isn't configured to persist data, it is very volatile, and a system crash would result in a loss of data.

! When to Use Redis
* For One Time Passwords (OTPs): These are usually generated to be used once and have short lifespans. With Redis ability to set an expiry date for data, you can safely store the OTP without worrying about deleting them after a certain period.
* For frequently accessed resources: For data that doesn't change too frequently but is accessed a lot, you can use Redis to save time that would have been spent querying the database or making a call to some external service.
* For heavy duty queries: For database queries that take time, and also won't change too often, use Redis to reduce this time by storing the results for as long as you like.

! How to use it in Tiki
In order to benefit from Redis, you need to activate the feature, from your control panel.
Go to: __Settings__->__control panels__->__Performance__ and then select __Redis__ tab menu, in order to see the menu content, assume that __advance mode__ is activated and Redis is already installed if not go to [https://wikisuite.org/Redis|How to install Redis].
Note: Redis requires [https://github.com/phpredis/phpredis#installation|PHP extension for Redis], and of course, [https://redis.io/|Redis]

Redis need client address where is going to construct to connect to redis server.
You should provide the server addresses you can set on __Redis servers__ field:
{CODE(caption="Redis servers" wrap="1" theme="dracula")}127.0.0.1{CODE}

https://redis.io/
{HTML()}<script type='text/javascript' src='https://openhub.net/p/redis/widgets/project_factoids_stats?format=js'></script>{HTML}

-=alias=-
(alias(Redis))