| @@ -31,10 +31,8 @@ | ||
| 31 | 31 | |
| 32 | 32 | if ( is_admin() ) { |
| 33 | 33 | add_action( 'elementor/admin/after_create_settings/' . Settings::PAGE_ID, [ $this, 'register_admin_fields' ], 100 ); |
| 34 | 34 | } |
| 35 | - | |
| 36 | - $this->clear_cache_on_site_changed(); | |
| 37 | 35 | } |
| 38 | 36 | |
| 39 | 37 | public function get_unique_id() { |
| 40 | 38 | $unique_id = get_option( static::OPTION_UNIQUE_ID ); |
| @@ -141,19 +139,6 @@ | ||
| 141 | 139 | 'desc' => esc_html__( 'Specify the duration for which data is stored in the cache. Elements caching speeds up loading by serving pre-rendered copies of elements, rather than rendering them fresh each time. This control ensures efficient performance and up-to-date content.', 'elementor' ), |
| 142 | 140 | ], |
| 143 | 141 | ] |
| 144 | 142 | ); |
| 145 | - } | |
| 146 | - | |
| 147 | - private function clear_cache_on_site_changed() { | |
| 148 | - add_action( 'activated_plugin', [ $this, 'clear_cache' ] ); | |
| 149 | - add_action( 'deactivated_plugin', [ $this, 'clear_cache' ] ); | |
| 150 | - add_action( 'switch_theme', [ $this, 'clear_cache' ] ); | |
| 151 | - add_action( 'upgrader_process_complete', [ $this, 'clear_cache' ] ); | |
| 152 | - | |
| 153 | - add_action( 'update_option_elementor_element_cache_ttl', [ $this, 'clear_cache' ] ); | |
| 154 | - } | |
| 155 | - | |
| 156 | - public function clear_cache() { | |
| 157 | - Plugin::$instance->files_manager->clear_cache(); | |
| 158 | 143 | } |
| 159 | 144 | } |