Plugin Directory

Changeset 3070018


Ignore:
Timestamp:
04/13/2024 12:09:31 PM (2 years ago)
Author:
camoo
Message:

Query Caching added

Location:
camoo-cdn/trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • camoo-cdn/trunk/camoo-cdn.php

    r3059026 r3070018  
    88 * Plugin URI: https://github.com/camoo/wp-camoo-cdn
    99 * Description: Integrates your WordPress site with Camoo.Hosting CDN for improved loading times and performance.
    10  * Version: 2.0.1
     10 * Version: 2.0.2
    1111 * Author: CAMOO SARL
    1212 * Author URI: https://www.camoo.hosting/
     
    1616 * Domain Path: /languages
    1717 * Requires at least: 6.4.3
    18  * Tested up to: 6.5
     18 * Tested up to: 6.5.2
    1919 * Requires PHP: 8.0
    2020 *
  • camoo-cdn/trunk/readme.txt

    r3059026 r3070018  
    33Tags: Camoo.Hosting, CAMOO CDN Integration, Managed Hosting with CDN, Hébergement Web avec CDN, WordPress Caching, WP Super Cache
    44Requires at least: 6.4.3
    5 Tested up to: 6.5
     5Requires Plugins: wp-super-cache
     6Tested up to: 6.5.2
    67Requires PHP: 8.0
    78Stable tag: 2.0.1
     
    4344
    4445== Changelog ==
     46= 2.0.2: 13.04, 2024 =
     47* Tweak: Query cache added
     48
    4549= 2.0.1: 26.03, 2024 =
    4650* Tweak: uninstall script added
  • camoo-cdn/trunk/src/Bootstrap.php

    r3059295 r3070018  
    55namespace WP_CAMOO\CDN;
    66
     7use WP_CAMOO\CDN\Cache\Settings;
    78use WP_CAMOO\CDN\Services\Integration;
     9use WP_CAMOO\CDN\Services\QueryCaching;
    810
    911final class Bootstrap
     
    5153        add_filter('all_plugins', [$this, 'modifyPluginDescription']);
    5254        add_action('admin_notices', [$this, 'displaySyncMessages']);
     55
     56        // Hook into the admin menu to add a settings page
     57        Settings::init();
     58        // Hook into the posts_results filter to cache queries
     59        add_filter('posts_results', [QueryCaching::class, 'read'], 10, 2);
     60
     61        // Clear the cache when posts are saved or deleted
     62        add_action('save_post', [QueryCaching::class, 'clear']);
     63        add_action('deleted_post', [QueryCaching::class, 'clear']);
    5364    }
    5465}
  • camoo-cdn/trunk/uninstall.php

    r3059295 r3070018  
    2020delete_option('ossdl_off_blog_url');
    2121delete_option('wp_camoo_cdn_db_version');
     22delete_option('camoo_cdn_cache_settings');
    2223
     24global $wpdb;
     25$wpdb->query("
     26           DELETE FROM {$wpdb->options}
     27           WHERE option_name LIKE '\_transient\_camoo\_cdn\_%' OR option_name LIKE '\_transient\_timeout\_camoo\_cdn\_%'
     28        ");
    2329$configFile = WP_CONTENT_DIR . '/wp-cache-config.php';
    2430if (file_exists($configFile)) {
Note: See TracChangeset for help on using the changeset viewer.