You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install the latest version of [Python](https://www.python.org/) on your local environment or on an Azure virtual machine or Azure App Service. Use pip to install redis-py.
60
60
61
61
```python
62
62
pip install redis
63
63
```
64
64
65
-
The following code creates a connection to Redis using redis-py, stores the query result into the redis cache and fetch the value from the cache.
65
+
The following code creates a connection to Azure Cache for Redis instance using redis-py, stores the query result into the Azure Cache for Redis and fetch the value from the cache.
Install [PHP](https://www.php.net/manual/en/install.php) on your local environment. Follow the steps below to write a PHP script that caches a SQL query from MySQL database. Here are a few pre-requisites before running the script:
100
100
101
-
1. Install and enable [Redis PECL extension](https://pecl.php.net/package/redis) to use Redis with your PHP script. See [how to install the extension locally](https://github.com/phpredis/phpredis/blob/develop/INSTALL.md)
101
+
1. Install and enable [Redis PECL extension](https://pecl.php.net/package/redis) to use Azure Cache for Redis with your PHP script. See [how to install the extension locally](https://github.com/phpredis/phpredis/blob/develop/INSTALL.md)
102
102
2. Install and enable [MySQL PDO extension](https://www.php.net/manual/en/ref.pdo-mysql.php)
The benefit of enabling Redis Cache to your WordPress application will allow you to deliver content faster since all of the WordPress content is stored in the database. You can cache content that is mostly read only from WordPress database to make the query lookups faster. You can use either of these plugins to setup Redis. Install and enable [Redis PECL extension](https://pecl.php.net/package/redis). See [how to install the extension locally](https://github.com/phpredis/phpredis/blob/develop/INSTALL.md) or [how to install the extension in Azure App Service](../../app-service/configure-language-php.md).
146
+
The benefit of enabling Azure Cache for Redis instance to your WordPress application will allow you to deliver content faster since all of the WordPress content is stored in the database. You can cache content that is mostly read only from WordPress database to make the query lookups faster. You can use either of these plugins to setup Redis. Install and enable [Redis PECL extension](https://pecl.php.net/package/redis). See [how to install the extension locally](https://github.com/phpredis/phpredis/blob/develop/INSTALL.md) or [how to install the extension in Azure App Service](../../app-service/configure-language-php.md).
147
147
148
-
1.[Redis Object cache](https://wordpress.org/plugins/redis-cache/): Install and activate this plugin. Now update the wp-config.php file right above the statement */* That's all, stop editing! Happy blogging. */**
148
+
Install[Redis Object cache](https://wordpress.org/plugins/redis-cache/)and activate this plugin on our WordPress application. Now update the `wp-config.php` file right above the statement */* That's all, stop editing! Happy blogging. */**
Go to the Wordpress admin dashboard and select the Redis settings page on the menu. Now select **enable Object Cache**. Plugin will read the redis server information from wp-config.php file.
171
+
Go to the Wordpress admin dashboard and select the Redis settings page on the menu. Now select **enable Object Cache**. Plugin will read the Azure Cache for Redis instance information from `wp-config.php` file.
172
172
173
-
You may also use [W3 Total cache](https://wordpress.org/plugins/w3-total-cache/) to configure Redis cache on your WordPress app. You can evaluate the performance improvements using [Query Monitor plugin](https://wordpress.org/plugins/query-monitor/), which allows you to debug database queries and it also shows total database queries grouped by a plugin.
173
+
You may also use [W3 Total cache](https://wordpress.org/plugins/w3-total-cache/) to configure Azure Cache for Redis on your WordPress app. You can evaluate the performance improvements using [Query Monitor plugin](https://wordpress.org/plugins/query-monitor/), which allows you to debug database queries and it also shows total database queries grouped by a plugin.
0 commit comments