# polylang/3.1/integrations/cache/load.php

Polylang, version 3.1. 22 lines.

- Page: https://pluginprobe.com/plugins/polylang/3.1/code/integrations/cache/load.php
- Raw: https://pluginprobe.com/plugins/polylang/3.1/raw/integrations/cache/load.php
- Modified: 2020-07-14T14:47:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/polylang/3.1/code/integrations/cache/load.php#L10-L20`.

```php
<?php
/**
 * Loads the integration with cache plugins.
 *
 * @package Polylang
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Don't access directly.
};

add_action(
	'plugins_loaded',
	function() {
		if ( pll_is_cache_active() ) {
			add_action( 'pll_init', array( PLL_Integrations::instance()->cache_compat = new PLL_Cache_Compat(), 'init' ) );
		}
	},
	0
);


```
