Plugin Directory

Changeset 3420309


Ignore:
Timestamp:
12/15/2025 03:56:26 PM (2 months ago)
Author:
hostspa
Message:

Some minor fix, Setting of default TTL to 300 sec due to ttl and grace caching method

Location:
fastcache-by-host-it
Files:
18 edited
1 copied

Legend:

Unmodified
Added
Removed
  • fastcache-by-host-it/tags/1.5.3/README.txt

    r3418273 r3420309  
    55Tested up to: 6.9.0
    66Requires PHP: 8.0
    7 Stable Tag: 1.5.2
     7Stable Tag: 1.5.3
    88License: GPL-2.0+
    99License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    132132
    133133== Changelog ==
     1341.5.3
     135Some minor fix, Setting of default TTL to 300 sec due to ttl and grace caching method
     136
    1341371.5.2
    135138Readme and Screenshots
  • fastcache-by-host-it/tags/1.5.3/fastcache.php

    r3418273 r3420309  
    1717 * Plugin URI:        https://fastcache.host.it/wordpress/
    1818 * Description:       Abilita il tuo sito Wordpress alla prima vera CDN realizzata PER Wordpress e configurata AD-HOC per il tuo sito. Il massimo della velocità senza difficoltà di setup.
    19  * Version:           1.5.2
     19 * Version:           1.5.3
    2020 * Author:            Host.it and JExtensions Store - Alessandro Poletto
    2121 * Author URI:        https://fastcache.host.it/alessandropoletto/
     
    4444define ( '_WP_EXEC', '1' );
    4545define ( '_FASTCACHE_EXEC', 1 );
    46 define ( 'FASTCACHE_VERSION', '1.5.2' );
     46define ( 'FASTCACHE_VERSION', '1.5.3' );
    4747
    4848define ( 'FASTCACHE_FILE_PATH', __FILE__ );
     
    5050define ( 'FASTCACHE_DIR', plugin_dir_path ( FASTCACHE_FILE_PATH ) );
    5151define ( 'FASTCACHE_CACHE_DIR', WP_CONTENT_DIR . '/cache/fastcache/' );
    52 
     52define ( 'FASTCACHE_DEFAULTTTL' , 300);
    5353function mainFastCachePluginActivation() {
    5454    $currentSettings = Plugin::getPluginParams()->toArray();
  • fastcache-by-host-it/tags/1.5.3/languages/fastcache-it_IT.po

    r3417545 r3420309  
    18781878"HTTP/2-compliant client before the client requests them. It is, for the most "
    18791879"part, a performance technique that can be helpful in loading resources "
    1880 "preemptively. If this option is enabled, JSpeed will communicate to the "
     1880"preemptively. If this option is enabled, FastCache will communicate to the "
    18811881"server to operate with this technique, keep in mind that this only works on "
    18821882"a HTTP/2 compliant server."
     
    18851885"a un client conforme a HTTP/2 prima che il client le richieda. È, per la "
    18861886"maggior parte, una tecnica di prestazione che può essere utile per caricare "
    1887 "risorse preventivamente. Se questa opzione è abilitata, JSpeed comunicherà "
     1887"risorse preventivamente. Se questa opzione è abilitata, FastCache comunicherà "
    18881888"al server di operare con questa tecnica, tieni presente che ciò funziona "
    18891889"solo su un server conforme a HTTP/2."
     
    23842384msgid ""
    23852385"If enabled, an additional HTML5 'srcset' attribute will be added for each "
    2386 "image that need to be optimized and JSpeed will automatically create up to 4 "
     2386"image that need to be optimized and FastCache will automatically create up to 4 "
    23872387"differently-sized images as variations to the base image. The browser will "
    23882388"pick up the most correct image based on the device screen size and "
     
    23942394msgstr ""
    23952395"Se abilitato, verrà aggiunto un attributo HTML5 aggiuntivo 'srcset' per ogni "
    2396 "immagine che deve essere ottimizzata e JSpeed creerà automaticamente fino a "
     2396"immagine che deve essere ottimizzata e FastCache creerà automaticamente fino a "
    23972397"4 immagini di dimensioni diverse come varianti dell'immagine di base. Il "
    23982398"browser sceglierà l'immagine più corretta in base alla dimensione dello "
     
    24872487#: src/Admin/Settings/TabSettings.php:500
    24882488msgid ""
    2489 "If enabled, JSpeed will generate a 'srcset' attribute for images using 'data-"
     2489"If enabled, FastCache will generate a 'srcset' attribute for images using 'data-"
    24902490"src' or custom 'data-' attributes, ensuring optimized responsive images for "
    24912491"different screen sizes and improving loading performance."
     
    29592959#: src/Admin/Settings/TabSettings.php:729
    29602960msgid ""
    2961 "By default, the TTL is set to 81000 seconds. If you need to use a different "
     2961"By default, the TTL is set to 300 seconds. If you need to use a different "
    29622962"value, you can enter it as the global default or set it per post type by "
    29632963"enabling this option."
    29642964msgstr ""
    2965 "Per impostazione predefinita, il TTL è impostato su 81000 secondi. Se è "
     2965"Per impostazione predefinita, il TTL è impostato su 300 secondi. Se è "
    29662966"necessario utilizzare un valore diverso, è possibile inserirlo come "
    29672967"predefinito globale o impostarlo per tipo di post abilitando questa opzione."
     
    32243224msgid ""
    32253225"Cache refresh time in seconds for this post. Entering \"0\" disables the "
    3226 "cache. Default: 86400"
     3226"cache. Default: 300"
    32273227msgstr ""
    32283228"Tempo di aggiornamento della cache in secondi per questo post. Inserendo "
    3229 "\"0\" si disabilita la cache. Valore predefinito: 86400"
     3229"\"0\" si disabilita la cache. Valore predefinito: 300"
    32303230
    32313231#: src/Host/admin/class-fastcache-admin.php:162
     
    34583458
    34593459#~ msgid ""
    3460 #~ "If enabled, JSpeed will create a WebP version of each image and generate "
     3460#~ "If enabled, FastCache will create a WebP version of each image and generate "
    34613461#~ "an additional 'srcset' attribute pointing to these WebP images."
    34623462#~ msgstr ""
    3463 #~ "Se abilitato, JSpeed creerà una versione WebP di ogni immagine e genererà "
     3463#~ "Se abilitato, FastCache creerà una versione WebP di ogni immagine e genererà "
    34643464#~ "un ulteriore attributo 'srcset' che punta a queste immagini WebP."
    34653465
     
    34683468
    34693469#~ msgid ""
    3470 #~ "If enabled, JSpeed will create an AVIF version of each image and generate "
     3470#~ "If enabled, FastCache will create an AVIF version of each image and generate "
    34713471#~ "an additional 'srcset' attribute pointing to these AVIF images."
    34723472#~ msgstr ""
    3473 #~ "Se abilitato, JSpeed creerà una versione AVIF di ogni immagine e genererà "
     3473#~ "Se abilitato, FastCache creerà una versione AVIF di ogni immagine e genererà "
    34743474#~ "un ulteriore attributo 'srcset' che punta a queste immagini AVIF."
    34753475
     
    34893489
    34903490#~ msgid ""
    3491 #~ "You can choose from the predefined set of image sizes that JSpeed should "
     3491#~ "You can choose from the predefined set of image sizes that FastCache should "
    34923492#~ "generate for the srcset. If you need custom sizes, please use the 'Custom "
    34933493#~ "sizes' field."
    34943494#~ msgstr ""
    34953495#~ "Puoi scegliere dall'insieme predefinito di dimensioni delle immagini che "
    3496 #~ "JSpeed dovrebbe generare per il srcset. Se hai bisogno di dimensioni "
     3496#~ "FastCache dovrebbe generare per il srcset. Se hai bisogno di dimensioni "
    34973497#~ "personalizzate, utilizza il campo 'Dimensioni personalizzate'."
    34983498
     
    37103710
    37113711#~ msgid ""
    3712 #~ "If enabled, JSpeed will remove the query string from the URL of each "
     3712#~ "If enabled, FastCache will remove the query string from the URL of each "
    37133713#~ "image source in order to facilitate the browser cache usage."
    37143714#~ msgstr ""
    3715 #~ "Se abilitato, JSpeed rimuoverà la stringa di query dall'URL di ogni "
     3715#~ "Se abilitato, FastCache rimuoverà la stringa di query dall'URL di ogni "
    37163716#~ "sorgente dell'immagine per facilitare l'utilizzo della cache del browser."
    37173717
     
    37423742
    37433743#~ msgid ""
    3744 #~ "If enabled, JSpeed will make use of the browser's native lazy loading for "
     3744#~ "If enabled, FastCache will make use of the browser's native lazy loading for "
    37453745#~ "images."
    37463746#~ msgstr ""
    3747 #~ "Se abilitato, JSpeed farà uso del lazy loading nativo del browser per le "
     3747#~ "Se abilitato, FastCache farà uso del lazy loading nativo del browser per le "
    37483748#~ "immagini."
    37493749
     
    38483848
    38493849#~ msgid ""
    3850 #~ "If enabled, JSpeed will convert PNG images to WebP format. This can "
     3850#~ "If enabled, FastCache will convert PNG images to WebP format. This can "
    38513851#~ "provide better compression and save more bandwidth."
    38523852#~ msgstr ""
    3853 #~ "Se abilitato, JSpeed convertirà le immagini PNG nel formato WebP. Questo "
     3853#~ "Se abilitato, FastCache convertirà le immagini PNG nel formato WebP. Questo "
    38543854#~ "può fornire una compressione migliore e risparmiare più larghezza di "
    38553855#~ "banda."
     
    38593859
    38603860#~ msgid ""
    3861 #~ "If enabled, JSpeed will convert JPEG images to WebP format. This can "
     3861#~ "If enabled, FastCache will convert JPEG images to WebP format. This can "
    38623862#~ "provide better compression and save more bandwidth."
    38633863#~ msgstr ""
    3864 #~ "Se abilitato, JSpeed convertirà le immagini JPEG nel formato WebP. Questo "
     3864#~ "Se abilitato, FastCache convertirà le immagini JPEG nel formato WebP. Questo "
    38653865#~ "può fornire una compressione migliore e risparmiare più larghezza di "
    38663866#~ "banda."
     
    38703870
    38713871#~ msgid ""
    3872 #~ "If enabled, JSpeed will convert GIF images to WebP format. This can "
     3872#~ "If enabled, FastCache will convert GIF images to WebP format. This can "
    38733873#~ "provide better compression and save more bandwidth."
    38743874#~ msgstr ""
    3875 #~ "Se abilitato, JSpeed convertirà le immagini GIF nel formato WebP. Questo "
     3875#~ "Se abilitato, FastCache convertirà le immagini GIF nel formato WebP. Questo "
    38763876#~ "può fornire una compressione migliore e risparmiare più larghezza di "
    38773877#~ "banda."
     
    38813881
    38823882#~ msgid ""
    3883 #~ "If enabled, JSpeed will convert PNG images to AVIF format. This can "
     3883#~ "If enabled, FastCache will convert PNG images to AVIF format. This can "
    38843884#~ "provide better compression and save more bandwidth."
    38853885#~ msgstr ""
    3886 #~ "Se abilitato, JSpeed convertirà le immagini PNG nel formato AVIF. Questo "
     3886#~ "Se abilitato, FastCache convertirà le immagini PNG nel formato AVIF. Questo "
    38873887#~ "può fornire una compressione migliore e risparmiare più larghezza di "
    38883888#~ "banda."
     
    38923892
    38933893#~ msgid ""
    3894 #~ "If enabled, JSpeed will convert JPEG images to AVIF format. This can "
     3894#~ "If enabled, FastCache will convert JPEG images to AVIF format. This can "
    38953895#~ "provide better compression and save more bandwidth."
    38963896#~ msgstr ""
    3897 #~ "Se abilitato, JSpeed convertirà le immagini JPEG nel formato AVIF. Questo "
     3897#~ "Se abilitato, FastCache convertirà le immagini JPEG nel formato AVIF. Questo "
    38983898#~ "può fornire una compressione migliore e risparmiare più larghezza di "
    38993899#~ "banda."
     
    39453945
    39463946#~ msgid ""
    3947 #~ "Select the image optimization fallback method to use when JSpeed fails to "
     3947#~ "Select the image optimization fallback method to use when FastCache fails to "
    39483948#~ "optimize images with an external service."
    39493949#~ msgstr ""
    39503950#~ "Scegli il metodo di fallback per l'ottimizzazione delle immagini da "
    3951 #~ "utilizzare quando JSpeed non riesce ad ottimizzare le immagini con un "
     3951#~ "utilizzare quando FastCache non riesce ad ottimizzare le immagini con un "
    39523952#~ "servizio esterno."
    39533953
     
    39763976
    39773977#~ msgid ""
    3978 #~ "If JSpeed fails to optimize an image with an external service, it will "
     3978#~ "If FastCache fails to optimize an image with an external service, it will "
    39793979#~ "display the original image without any optimization."
    39803980#~ msgstr ""
    3981 #~ "Se JSpeed non riesce ad ottimizzare un'immagine con un servizio esterno, "
     3981#~ "Se FastCache non riesce ad ottimizzare un'immagine con un servizio esterno, "
    39823982#~ "verrà visualizzata l'immagine originale senza alcuna ottimizzazione."
    39833983
     
    39863986
    39873987#~ msgid ""
    3988 #~ "If JSpeed fails to optimize an image with an external service, it will "
     3988#~ "If FastCache fails to optimize an image with an external service, it will "
    39893989#~ "disable lazy loading and WebP conversion for that image."
    39903990#~ msgstr ""
    3991 #~ "Se JSpeed non riesce ad ottimizzare un'immagine con un servizio esterno, "
     3991#~ "Se FastCache non riesce ad ottimizzare un'immagine con un servizio esterno, "
    39923992#~ "disabiliterà lazy loading e conversione WebP per quella immagine."
    39933993
     
    39963996
    39973997#~ msgid ""
    3998 #~ "If JSpeed fails to optimize an image with an external service, it will "
     3998#~ "If FastCache fails to optimize an image with an external service, it will "
    39993999#~ "attempt to optimize the image using the local image optimization library."
    40004000#~ msgstr ""
    4001 #~ "Se JSpeed non riesce ad ottimizzare un'immagine con un servizio esterno, "
     4001#~ "Se FastCache non riesce ad ottimizzare un'immagine con un servizio esterno, "
    40024002#~ "proverà ad ottimizzare l'immagine utilizzando la libreria di "
    40034003#~ "ottimizzazione delle immagini locale."
     
    41004100
    41014101#~ msgid ""
    4102 #~ "If enabled, JSpeed will use an external API for image optimization. You "
     4102#~ "If enabled, FastCache will use an external API for image optimization. You "
    41034103#~ "need to configure the API credentials below."
    41044104#~ msgstr ""
    4105 #~ "Se abilitato, JSpeed utilizzerà una API esterna per l'ottimizzazione "
     4105#~ "Se abilitato, FastCache utilizzerà una API esterna per l'ottimizzazione "
    41064106#~ "dell'immagine. Devi configurare le credenziali API di seguito."
    41074107
     
    41374137
    41384138#~ msgid ""
    4139 #~ "If enabled, JSpeed will cache the responses from the external image "
     4139#~ "If enabled, FastCache will cache the responses from the external image "
    41404140#~ "optimization API to reduce API usage and improve performance."
    41414141#~ msgstr ""
    4142 #~ "Se abilitato, JSpeed memorizzerà nella cache le risposte dalla API "
     4142#~ "Se abilitato, FastCache memorizzerà nella cache le risposte dalla API "
    41434143#~ "esterna di ottimizzazione delle immagini per ridurre l'uso della API e "
    41444144#~ "migliorare le prestazioni."
  • fastcache-by-host-it/tags/1.5.3/languages/fastcache.pot

    r3417545 r3420309  
    16101610"HTTP/2-compliant client before the client requests them. It is, for the most "
    16111611"part, a performance technique that can be helpful in loading resources "
    1612 "preemptively. If this option is enabled, JSpeed will communicate to the "
     1612"preemptively. If this option is enabled, FastCache will communicate to the "
    16131613"server to operate with this technique, keep in mind that this only works on "
    16141614"a HTTP/2 compliant server."
     
    19871987msgid ""
    19881988"If enabled, an additional HTML5 'srcset' attribute will be added for each "
    1989 "image that need to be optimized and JSpeed will automatically create up to 4 "
     1989"image that need to be optimized and FastCache will automatically create up to 4 "
    19901990"differently-sized images as variations to the base image. The browser will "
    19911991"pick up the most correct image based on the device screen size and "
     
    20612061#: src/Admin/Settings/TabSettings.php:500
    20622062msgid ""
    2063 "If enabled, JSpeed will generate a 'srcset' attribute for images using 'data-"
     2063"If enabled, FastCache will generate a 'srcset' attribute for images using 'data-"
    20642064"src' or custom 'data-' attributes, ensuring optimized responsive images for "
    20652065"different screen sizes and improving loading performance."
     
    24342434#: src/Admin/Settings/TabSettings.php:729
    24352435msgid ""
    2436 "By default, the TTL is set to 81000 seconds. If you need to use a different "
     2436"By default, the TTL is set to 300 seconds. If you need to use a different "
    24372437"value, you can enter it as the global default or set it per post type by "
    24382438"enabling this option."
     
    26712671msgid ""
    26722672"Cache refresh time in seconds for this post. Entering \"0\" disables the "
    2673 "cache. Default: 86400"
     2673"cache. Default: 300"
    26742674msgstr ""
    26752675
  • fastcache-by-host-it/tags/1.5.3/src/Admin/Settings/Html.php

    r3417545 r3420309  
    434434            $field_id   = "fastcache_settings_{$settingName}_{$pt}";
    435435   
    436             // Valore salvato o fallback 86400
    437             $value = isset( $activeValues[$pt] ) ? $activeValues[$pt] : '86400';
     436            // Valore salvato o fallback 300
     437            $value = isset( $activeValues[$pt] ) ? $activeValues[$pt] : '300';
    438438   
    439439            // Render del singolo campo
  • fastcache-by-host-it/tags/1.5.3/src/Admin/Settings/Renderer/Setting.php

    r3417545 r3420309  
    7979        ];
    8080       
    81         echo Html::_ ( 'select', 'cache_lifetime', '86400', $aOptions );
     81        echo Html::_ ( 'select', 'cache_lifetime', '300', $aOptions );
    8282    }
    8383    public static function html_minify_level() {
     
    616616        $aSavedSettings = get_option( 'fastcache_settings' );
    617617        $fastcacheEnableChecked = isset($aSavedSettings['fastcache-enable']) ? 'checked="checked"' : '';
    618         $defaultTTLValue = isset($aSavedSettings['default-ttl']) ? $aSavedSettings['default-ttl'] : 86400;
     618        $defaultTTLValue = isset($aSavedSettings['default-ttl']) ? $aSavedSettings['default-ttl'] : FASTCACHE_DEFAULTTTL;
    619619        $fastCacheTextDescription = __ ('If selected, activates communication with the CDN', 'fastcache');
    620620        if($fastcacheEnableChecked) {
     
    789789   
    790790    public static function fastcache_cdn_default_ttl() {
    791         echo Html::_ ( 'text', 'default-ttl', '86400', '' );
     791        echo Html::_ ( 'text', 'default-ttl', '300', '' );
    792792    }
    793793    public static function fastcache_cdn_types_ttl() {
  • fastcache-by-host-it/tags/1.5.3/src/Admin/Settings/TabSettings.php

    r3417545 r3420309  
    727727                        'fastcache_cdn_enable_ttl' => [
    728728                                __ ( 'Enable TTL', 'fastcache' ),
    729                                 __ ( 'By default, the TTL is set to 81000 seconds. If you need to use a different value, you can enter it as the global default or set it per post type by enabling this option.', 'fastcache' )
     729                                __ ( 'By default, the TTL is set to 300 seconds. If you need to use a different value, you can enter it as the global default or set it per post type by enabling this option.', 'fastcache' )
    730730                        ],
    731731                        'fastcache_cdn_default_ttl_notfound_set' => [
  • fastcache-by-host-it/tags/1.5.3/src/Host/admin/class-fastcache-admin.php

    r3417545 r3420309  
    8585                        'name' => 'ttl',
    8686                        'title' => 'TTL',
    87                         'description' => __ ( 'Cache refresh time in seconds for this post. Entering "0" disables the cache. Default: 86400' ),
     87                        'description' => __ ( 'Cache refresh time in seconds for this post. Entering "0" disables the cache. Default: ' . FASTCACHE_DEFAULTTTL ),
    8888                        'type' => 'text',
    8989                        'scope' => array (
  • fastcache-by-host-it/tags/1.5.3/src/Host/public/class-fastcache-public.php

    r3417545 r3420309  
    184184        $enable = 0;
    185185        $pt = 'post';
    186         if (! isset ( $post->post_type )) {
    187             $ttl = 86400;
    188         } else {
     186        $ttl = 300;
     187        if ( isset ( $post->post_type )) {
    189188            $pt = $post->post_type;
    190 
     189           
    191190            $settings = get_option ( FASTCACHEHOST_HOST_PLUGINNAME . '_settings' );
    192191            $enable = 0;
     192            $token = "";
    193193            if (isset ( $settings ['fastcache-enable'] )) {
    194194                $enable = $settings ['fastcache-enable'];
    195195            }
    196             $token = "";
    197196            if (isset ( $settings ['text-token'] )) {
    198197                $token = $settings ['text-token'];
    199198            }
    200 
     199            /*
     200             * se ho un ttl impostato per un certo posttype e se è superiore a "0"
     201             * allora lo uso come valore di ttl
     202             */
    201203            if (isset ( $settings ['ttl-post-types'] [$pt] ) && trim ( $settings ['ttl-post-types'] [$pt] ) != "" && $settings ['ttl-post-types'] [$pt] > 0) {
    202204                // echo "trovato post type ".$pt . " set ttl: " . $settings['ttl-post-types'][$pt] . "<br>" ;
    203205                $ttl = $settings ['ttl-post-types'] [$pt];
    204             } else if (isset ( $settings ['default-ttl'] ) && trim ( $settings ['default-ttl'] ) != "" && $settings ['default-ttl'] > 0 && isset ( $settings ['fastcache_cdn_default_ttl_notfound_set'] ) && $settings ['fastcache_cdn_default_ttl_notfound_set'] == 1) {
     206            } else if (
     207            /*
     208             * ALTRIMENTI SE
     209             * se ho un impostato il flag tale per cui in caso di NON ttl imposto il default
     210             * allora uso come ttl il default_ttl generico per l'applicazione
     211             */
     212                isset ( $settings ['default-ttl'] )
     213                && trim ( $settings ['default-ttl'] ) != ""
     214                && $settings ['default-ttl'] > 0
     215                && isset ( $settings ['fastcache_cdn_default_ttl_notfound_set'] )
     216                && $settings ['fastcache_cdn_default_ttl_notfound_set'] == 1
     217            ) {
    205218                // echo "trovato default ttl: " . $settings['default-ttl'] . "<br>" ;
    206219                $ttl = $settings ['default-ttl'];
    207             } else {
    208                 if (isset ( $settings ['fastcache_cdn_default_ttl_notfound_set'] ) && $settings ['fastcache_cdn_default_ttl_notfound_set'] == 1 ) {
    209                     $ttl = $settings ['default-ttl'] ?: 86400;
    210                 } else {
    211                     $ttl = 0;
    212                 }
    213             }
     220            } else if (isset ( $settings ['fastcache_cdn_default_ttl_notfound_set'] ) && $settings ['fastcache_cdn_default_ttl_notfound_set'] == 1 ) {
     221                /*
     222                 * altrimenti SE
     223                * se ho un impostato il flag tale per cui in caso di NON ttl imposto il default
     224                 * FASTCACHE_DEFAULTTTL
     225                 */
     226               
     227                    $ttl = $settings ['default-ttl'] ?: FASTCACHE_DEFAULTTTL;
     228            }
     229           
    214230        }
    215231        if (is_feed ()) {
  • fastcache-by-host-it/trunk/README.txt

    r3418273 r3420309  
    55Tested up to: 6.9.0
    66Requires PHP: 8.0
    7 Stable Tag: 1.5.2
     7Stable Tag: 1.5.3
    88License: GPL-2.0+
    99License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    132132
    133133== Changelog ==
     1341.5.3
     135Some minor fix, Setting of default TTL to 300 sec due to ttl and grace caching method
     136
    1341371.5.2
    135138Readme and Screenshots
  • fastcache-by-host-it/trunk/fastcache.php

    r3418273 r3420309  
    1717 * Plugin URI:        https://fastcache.host.it/wordpress/
    1818 * Description:       Abilita il tuo sito Wordpress alla prima vera CDN realizzata PER Wordpress e configurata AD-HOC per il tuo sito. Il massimo della velocità senza difficoltà di setup.
    19  * Version:           1.5.2
     19 * Version:           1.5.3
    2020 * Author:            Host.it and JExtensions Store - Alessandro Poletto
    2121 * Author URI:        https://fastcache.host.it/alessandropoletto/
     
    4444define ( '_WP_EXEC', '1' );
    4545define ( '_FASTCACHE_EXEC', 1 );
    46 define ( 'FASTCACHE_VERSION', '1.5.2' );
     46define ( 'FASTCACHE_VERSION', '1.5.3' );
    4747
    4848define ( 'FASTCACHE_FILE_PATH', __FILE__ );
     
    5050define ( 'FASTCACHE_DIR', plugin_dir_path ( FASTCACHE_FILE_PATH ) );
    5151define ( 'FASTCACHE_CACHE_DIR', WP_CONTENT_DIR . '/cache/fastcache/' );
    52 
     52define ( 'FASTCACHE_DEFAULTTTL' , 300);
    5353function mainFastCachePluginActivation() {
    5454    $currentSettings = Plugin::getPluginParams()->toArray();
  • fastcache-by-host-it/trunk/languages/fastcache-it_IT.po

    r3417545 r3420309  
    18781878"HTTP/2-compliant client before the client requests them. It is, for the most "
    18791879"part, a performance technique that can be helpful in loading resources "
    1880 "preemptively. If this option is enabled, JSpeed will communicate to the "
     1880"preemptively. If this option is enabled, FastCache will communicate to the "
    18811881"server to operate with this technique, keep in mind that this only works on "
    18821882"a HTTP/2 compliant server."
     
    18851885"a un client conforme a HTTP/2 prima che il client le richieda. È, per la "
    18861886"maggior parte, una tecnica di prestazione che può essere utile per caricare "
    1887 "risorse preventivamente. Se questa opzione è abilitata, JSpeed comunicherà "
     1887"risorse preventivamente. Se questa opzione è abilitata, FastCache comunicherà "
    18881888"al server di operare con questa tecnica, tieni presente che ciò funziona "
    18891889"solo su un server conforme a HTTP/2."
     
    23842384msgid ""
    23852385"If enabled, an additional HTML5 'srcset' attribute will be added for each "
    2386 "image that need to be optimized and JSpeed will automatically create up to 4 "
     2386"image that need to be optimized and FastCache will automatically create up to 4 "
    23872387"differently-sized images as variations to the base image. The browser will "
    23882388"pick up the most correct image based on the device screen size and "
     
    23942394msgstr ""
    23952395"Se abilitato, verrà aggiunto un attributo HTML5 aggiuntivo 'srcset' per ogni "
    2396 "immagine che deve essere ottimizzata e JSpeed creerà automaticamente fino a "
     2396"immagine che deve essere ottimizzata e FastCache creerà automaticamente fino a "
    23972397"4 immagini di dimensioni diverse come varianti dell'immagine di base. Il "
    23982398"browser sceglierà l'immagine più corretta in base alla dimensione dello "
     
    24872487#: src/Admin/Settings/TabSettings.php:500
    24882488msgid ""
    2489 "If enabled, JSpeed will generate a 'srcset' attribute for images using 'data-"
     2489"If enabled, FastCache will generate a 'srcset' attribute for images using 'data-"
    24902490"src' or custom 'data-' attributes, ensuring optimized responsive images for "
    24912491"different screen sizes and improving loading performance."
     
    29592959#: src/Admin/Settings/TabSettings.php:729
    29602960msgid ""
    2961 "By default, the TTL is set to 81000 seconds. If you need to use a different "
     2961"By default, the TTL is set to 300 seconds. If you need to use a different "
    29622962"value, you can enter it as the global default or set it per post type by "
    29632963"enabling this option."
    29642964msgstr ""
    2965 "Per impostazione predefinita, il TTL è impostato su 81000 secondi. Se è "
     2965"Per impostazione predefinita, il TTL è impostato su 300 secondi. Se è "
    29662966"necessario utilizzare un valore diverso, è possibile inserirlo come "
    29672967"predefinito globale o impostarlo per tipo di post abilitando questa opzione."
     
    32243224msgid ""
    32253225"Cache refresh time in seconds for this post. Entering \"0\" disables the "
    3226 "cache. Default: 86400"
     3226"cache. Default: 300"
    32273227msgstr ""
    32283228"Tempo di aggiornamento della cache in secondi per questo post. Inserendo "
    3229 "\"0\" si disabilita la cache. Valore predefinito: 86400"
     3229"\"0\" si disabilita la cache. Valore predefinito: 300"
    32303230
    32313231#: src/Host/admin/class-fastcache-admin.php:162
     
    34583458
    34593459#~ msgid ""
    3460 #~ "If enabled, JSpeed will create a WebP version of each image and generate "
     3460#~ "If enabled, FastCache will create a WebP version of each image and generate "
    34613461#~ "an additional 'srcset' attribute pointing to these WebP images."
    34623462#~ msgstr ""
    3463 #~ "Se abilitato, JSpeed creerà una versione WebP di ogni immagine e genererà "
     3463#~ "Se abilitato, FastCache creerà una versione WebP di ogni immagine e genererà "
    34643464#~ "un ulteriore attributo 'srcset' che punta a queste immagini WebP."
    34653465
     
    34683468
    34693469#~ msgid ""
    3470 #~ "If enabled, JSpeed will create an AVIF version of each image and generate "
     3470#~ "If enabled, FastCache will create an AVIF version of each image and generate "
    34713471#~ "an additional 'srcset' attribute pointing to these AVIF images."
    34723472#~ msgstr ""
    3473 #~ "Se abilitato, JSpeed creerà una versione AVIF di ogni immagine e genererà "
     3473#~ "Se abilitato, FastCache creerà una versione AVIF di ogni immagine e genererà "
    34743474#~ "un ulteriore attributo 'srcset' che punta a queste immagini AVIF."
    34753475
     
    34893489
    34903490#~ msgid ""
    3491 #~ "You can choose from the predefined set of image sizes that JSpeed should "
     3491#~ "You can choose from the predefined set of image sizes that FastCache should "
    34923492#~ "generate for the srcset. If you need custom sizes, please use the 'Custom "
    34933493#~ "sizes' field."
    34943494#~ msgstr ""
    34953495#~ "Puoi scegliere dall'insieme predefinito di dimensioni delle immagini che "
    3496 #~ "JSpeed dovrebbe generare per il srcset. Se hai bisogno di dimensioni "
     3496#~ "FastCache dovrebbe generare per il srcset. Se hai bisogno di dimensioni "
    34973497#~ "personalizzate, utilizza il campo 'Dimensioni personalizzate'."
    34983498
     
    37103710
    37113711#~ msgid ""
    3712 #~ "If enabled, JSpeed will remove the query string from the URL of each "
     3712#~ "If enabled, FastCache will remove the query string from the URL of each "
    37133713#~ "image source in order to facilitate the browser cache usage."
    37143714#~ msgstr ""
    3715 #~ "Se abilitato, JSpeed rimuoverà la stringa di query dall'URL di ogni "
     3715#~ "Se abilitato, FastCache rimuoverà la stringa di query dall'URL di ogni "
    37163716#~ "sorgente dell'immagine per facilitare l'utilizzo della cache del browser."
    37173717
     
    37423742
    37433743#~ msgid ""
    3744 #~ "If enabled, JSpeed will make use of the browser's native lazy loading for "
     3744#~ "If enabled, FastCache will make use of the browser's native lazy loading for "
    37453745#~ "images."
    37463746#~ msgstr ""
    3747 #~ "Se abilitato, JSpeed farà uso del lazy loading nativo del browser per le "
     3747#~ "Se abilitato, FastCache farà uso del lazy loading nativo del browser per le "
    37483748#~ "immagini."
    37493749
     
    38483848
    38493849#~ msgid ""
    3850 #~ "If enabled, JSpeed will convert PNG images to WebP format. This can "
     3850#~ "If enabled, FastCache will convert PNG images to WebP format. This can "
    38513851#~ "provide better compression and save more bandwidth."
    38523852#~ msgstr ""
    3853 #~ "Se abilitato, JSpeed convertirà le immagini PNG nel formato WebP. Questo "
     3853#~ "Se abilitato, FastCache convertirà le immagini PNG nel formato WebP. Questo "
    38543854#~ "può fornire una compressione migliore e risparmiare più larghezza di "
    38553855#~ "banda."
     
    38593859
    38603860#~ msgid ""
    3861 #~ "If enabled, JSpeed will convert JPEG images to WebP format. This can "
     3861#~ "If enabled, FastCache will convert JPEG images to WebP format. This can "
    38623862#~ "provide better compression and save more bandwidth."
    38633863#~ msgstr ""
    3864 #~ "Se abilitato, JSpeed convertirà le immagini JPEG nel formato WebP. Questo "
     3864#~ "Se abilitato, FastCache convertirà le immagini JPEG nel formato WebP. Questo "
    38653865#~ "può fornire una compressione migliore e risparmiare più larghezza di "
    38663866#~ "banda."
     
    38703870
    38713871#~ msgid ""
    3872 #~ "If enabled, JSpeed will convert GIF images to WebP format. This can "
     3872#~ "If enabled, FastCache will convert GIF images to WebP format. This can "
    38733873#~ "provide better compression and save more bandwidth."
    38743874#~ msgstr ""
    3875 #~ "Se abilitato, JSpeed convertirà le immagini GIF nel formato WebP. Questo "
     3875#~ "Se abilitato, FastCache convertirà le immagini GIF nel formato WebP. Questo "
    38763876#~ "può fornire una compressione migliore e risparmiare più larghezza di "
    38773877#~ "banda."
     
    38813881
    38823882#~ msgid ""
    3883 #~ "If enabled, JSpeed will convert PNG images to AVIF format. This can "
     3883#~ "If enabled, FastCache will convert PNG images to AVIF format. This can "
    38843884#~ "provide better compression and save more bandwidth."
    38853885#~ msgstr ""
    3886 #~ "Se abilitato, JSpeed convertirà le immagini PNG nel formato AVIF. Questo "
     3886#~ "Se abilitato, FastCache convertirà le immagini PNG nel formato AVIF. Questo "
    38873887#~ "può fornire una compressione migliore e risparmiare più larghezza di "
    38883888#~ "banda."
     
    38923892
    38933893#~ msgid ""
    3894 #~ "If enabled, JSpeed will convert JPEG images to AVIF format. This can "
     3894#~ "If enabled, FastCache will convert JPEG images to AVIF format. This can "
    38953895#~ "provide better compression and save more bandwidth."
    38963896#~ msgstr ""
    3897 #~ "Se abilitato, JSpeed convertirà le immagini JPEG nel formato AVIF. Questo "
     3897#~ "Se abilitato, FastCache convertirà le immagini JPEG nel formato AVIF. Questo "
    38983898#~ "può fornire una compressione migliore e risparmiare più larghezza di "
    38993899#~ "banda."
     
    39453945
    39463946#~ msgid ""
    3947 #~ "Select the image optimization fallback method to use when JSpeed fails to "
     3947#~ "Select the image optimization fallback method to use when FastCache fails to "
    39483948#~ "optimize images with an external service."
    39493949#~ msgstr ""
    39503950#~ "Scegli il metodo di fallback per l'ottimizzazione delle immagini da "
    3951 #~ "utilizzare quando JSpeed non riesce ad ottimizzare le immagini con un "
     3951#~ "utilizzare quando FastCache non riesce ad ottimizzare le immagini con un "
    39523952#~ "servizio esterno."
    39533953
     
    39763976
    39773977#~ msgid ""
    3978 #~ "If JSpeed fails to optimize an image with an external service, it will "
     3978#~ "If FastCache fails to optimize an image with an external service, it will "
    39793979#~ "display the original image without any optimization."
    39803980#~ msgstr ""
    3981 #~ "Se JSpeed non riesce ad ottimizzare un'immagine con un servizio esterno, "
     3981#~ "Se FastCache non riesce ad ottimizzare un'immagine con un servizio esterno, "
    39823982#~ "verrà visualizzata l'immagine originale senza alcuna ottimizzazione."
    39833983
     
    39863986
    39873987#~ msgid ""
    3988 #~ "If JSpeed fails to optimize an image with an external service, it will "
     3988#~ "If FastCache fails to optimize an image with an external service, it will "
    39893989#~ "disable lazy loading and WebP conversion for that image."
    39903990#~ msgstr ""
    3991 #~ "Se JSpeed non riesce ad ottimizzare un'immagine con un servizio esterno, "
     3991#~ "Se FastCache non riesce ad ottimizzare un'immagine con un servizio esterno, "
    39923992#~ "disabiliterà lazy loading e conversione WebP per quella immagine."
    39933993
     
    39963996
    39973997#~ msgid ""
    3998 #~ "If JSpeed fails to optimize an image with an external service, it will "
     3998#~ "If FastCache fails to optimize an image with an external service, it will "
    39993999#~ "attempt to optimize the image using the local image optimization library."
    40004000#~ msgstr ""
    4001 #~ "Se JSpeed non riesce ad ottimizzare un'immagine con un servizio esterno, "
     4001#~ "Se FastCache non riesce ad ottimizzare un'immagine con un servizio esterno, "
    40024002#~ "proverà ad ottimizzare l'immagine utilizzando la libreria di "
    40034003#~ "ottimizzazione delle immagini locale."
     
    41004100
    41014101#~ msgid ""
    4102 #~ "If enabled, JSpeed will use an external API for image optimization. You "
     4102#~ "If enabled, FastCache will use an external API for image optimization. You "
    41034103#~ "need to configure the API credentials below."
    41044104#~ msgstr ""
    4105 #~ "Se abilitato, JSpeed utilizzerà una API esterna per l'ottimizzazione "
     4105#~ "Se abilitato, FastCache utilizzerà una API esterna per l'ottimizzazione "
    41064106#~ "dell'immagine. Devi configurare le credenziali API di seguito."
    41074107
     
    41374137
    41384138#~ msgid ""
    4139 #~ "If enabled, JSpeed will cache the responses from the external image "
     4139#~ "If enabled, FastCache will cache the responses from the external image "
    41404140#~ "optimization API to reduce API usage and improve performance."
    41414141#~ msgstr ""
    4142 #~ "Se abilitato, JSpeed memorizzerà nella cache le risposte dalla API "
     4142#~ "Se abilitato, FastCache memorizzerà nella cache le risposte dalla API "
    41434143#~ "esterna di ottimizzazione delle immagini per ridurre l'uso della API e "
    41444144#~ "migliorare le prestazioni."
  • fastcache-by-host-it/trunk/languages/fastcache.pot

    r3417545 r3420309  
    16101610"HTTP/2-compliant client before the client requests them. It is, for the most "
    16111611"part, a performance technique that can be helpful in loading resources "
    1612 "preemptively. If this option is enabled, JSpeed will communicate to the "
     1612"preemptively. If this option is enabled, FastCache will communicate to the "
    16131613"server to operate with this technique, keep in mind that this only works on "
    16141614"a HTTP/2 compliant server."
     
    19871987msgid ""
    19881988"If enabled, an additional HTML5 'srcset' attribute will be added for each "
    1989 "image that need to be optimized and JSpeed will automatically create up to 4 "
     1989"image that need to be optimized and FastCache will automatically create up to 4 "
    19901990"differently-sized images as variations to the base image. The browser will "
    19911991"pick up the most correct image based on the device screen size and "
     
    20612061#: src/Admin/Settings/TabSettings.php:500
    20622062msgid ""
    2063 "If enabled, JSpeed will generate a 'srcset' attribute for images using 'data-"
     2063"If enabled, FastCache will generate a 'srcset' attribute for images using 'data-"
    20642064"src' or custom 'data-' attributes, ensuring optimized responsive images for "
    20652065"different screen sizes and improving loading performance."
     
    24342434#: src/Admin/Settings/TabSettings.php:729
    24352435msgid ""
    2436 "By default, the TTL is set to 81000 seconds. If you need to use a different "
     2436"By default, the TTL is set to 300 seconds. If you need to use a different "
    24372437"value, you can enter it as the global default or set it per post type by "
    24382438"enabling this option."
     
    26712671msgid ""
    26722672"Cache refresh time in seconds for this post. Entering \"0\" disables the "
    2673 "cache. Default: 86400"
     2673"cache. Default: 300"
    26742674msgstr ""
    26752675
  • fastcache-by-host-it/trunk/src/Admin/Settings/Html.php

    r3417545 r3420309  
    434434            $field_id   = "fastcache_settings_{$settingName}_{$pt}";
    435435   
    436             // Valore salvato o fallback 86400
    437             $value = isset( $activeValues[$pt] ) ? $activeValues[$pt] : '86400';
     436            // Valore salvato o fallback 300
     437            $value = isset( $activeValues[$pt] ) ? $activeValues[$pt] : '300';
    438438   
    439439            // Render del singolo campo
  • fastcache-by-host-it/trunk/src/Admin/Settings/Renderer/Setting.php

    r3417545 r3420309  
    7979        ];
    8080       
    81         echo Html::_ ( 'select', 'cache_lifetime', '86400', $aOptions );
     81        echo Html::_ ( 'select', 'cache_lifetime', '300', $aOptions );
    8282    }
    8383    public static function html_minify_level() {
     
    616616        $aSavedSettings = get_option( 'fastcache_settings' );
    617617        $fastcacheEnableChecked = isset($aSavedSettings['fastcache-enable']) ? 'checked="checked"' : '';
    618         $defaultTTLValue = isset($aSavedSettings['default-ttl']) ? $aSavedSettings['default-ttl'] : 86400;
     618        $defaultTTLValue = isset($aSavedSettings['default-ttl']) ? $aSavedSettings['default-ttl'] : FASTCACHE_DEFAULTTTL;
    619619        $fastCacheTextDescription = __ ('If selected, activates communication with the CDN', 'fastcache');
    620620        if($fastcacheEnableChecked) {
     
    789789   
    790790    public static function fastcache_cdn_default_ttl() {
    791         echo Html::_ ( 'text', 'default-ttl', '86400', '' );
     791        echo Html::_ ( 'text', 'default-ttl', '300', '' );
    792792    }
    793793    public static function fastcache_cdn_types_ttl() {
  • fastcache-by-host-it/trunk/src/Admin/Settings/TabSettings.php

    r3417545 r3420309  
    727727                        'fastcache_cdn_enable_ttl' => [
    728728                                __ ( 'Enable TTL', 'fastcache' ),
    729                                 __ ( 'By default, the TTL is set to 81000 seconds. If you need to use a different value, you can enter it as the global default or set it per post type by enabling this option.', 'fastcache' )
     729                                __ ( 'By default, the TTL is set to 300 seconds. If you need to use a different value, you can enter it as the global default or set it per post type by enabling this option.', 'fastcache' )
    730730                        ],
    731731                        'fastcache_cdn_default_ttl_notfound_set' => [
  • fastcache-by-host-it/trunk/src/Host/admin/class-fastcache-admin.php

    r3417545 r3420309  
    8585                        'name' => 'ttl',
    8686                        'title' => 'TTL',
    87                         'description' => __ ( 'Cache refresh time in seconds for this post. Entering "0" disables the cache. Default: 86400' ),
     87                        'description' => __ ( 'Cache refresh time in seconds for this post. Entering "0" disables the cache. Default: ' . FASTCACHE_DEFAULTTTL ),
    8888                        'type' => 'text',
    8989                        'scope' => array (
  • fastcache-by-host-it/trunk/src/Host/public/class-fastcache-public.php

    r3417545 r3420309  
    184184        $enable = 0;
    185185        $pt = 'post';
    186         if (! isset ( $post->post_type )) {
    187             $ttl = 86400;
    188         } else {
     186        $ttl = 300;
     187        if ( isset ( $post->post_type )) {
    189188            $pt = $post->post_type;
    190 
     189           
    191190            $settings = get_option ( FASTCACHEHOST_HOST_PLUGINNAME . '_settings' );
    192191            $enable = 0;
     192            $token = "";
    193193            if (isset ( $settings ['fastcache-enable'] )) {
    194194                $enable = $settings ['fastcache-enable'];
    195195            }
    196             $token = "";
    197196            if (isset ( $settings ['text-token'] )) {
    198197                $token = $settings ['text-token'];
    199198            }
    200 
     199            /*
     200             * se ho un ttl impostato per un certo posttype e se è superiore a "0"
     201             * allora lo uso come valore di ttl
     202             */
    201203            if (isset ( $settings ['ttl-post-types'] [$pt] ) && trim ( $settings ['ttl-post-types'] [$pt] ) != "" && $settings ['ttl-post-types'] [$pt] > 0) {
    202204                // echo "trovato post type ".$pt . " set ttl: " . $settings['ttl-post-types'][$pt] . "<br>" ;
    203205                $ttl = $settings ['ttl-post-types'] [$pt];
    204             } else if (isset ( $settings ['default-ttl'] ) && trim ( $settings ['default-ttl'] ) != "" && $settings ['default-ttl'] > 0 && isset ( $settings ['fastcache_cdn_default_ttl_notfound_set'] ) && $settings ['fastcache_cdn_default_ttl_notfound_set'] == 1) {
     206            } else if (
     207            /*
     208             * ALTRIMENTI SE
     209             * se ho un impostato il flag tale per cui in caso di NON ttl imposto il default
     210             * allora uso come ttl il default_ttl generico per l'applicazione
     211             */
     212                isset ( $settings ['default-ttl'] )
     213                && trim ( $settings ['default-ttl'] ) != ""
     214                && $settings ['default-ttl'] > 0
     215                && isset ( $settings ['fastcache_cdn_default_ttl_notfound_set'] )
     216                && $settings ['fastcache_cdn_default_ttl_notfound_set'] == 1
     217            ) {
    205218                // echo "trovato default ttl: " . $settings['default-ttl'] . "<br>" ;
    206219                $ttl = $settings ['default-ttl'];
    207             } else {
    208                 if (isset ( $settings ['fastcache_cdn_default_ttl_notfound_set'] ) && $settings ['fastcache_cdn_default_ttl_notfound_set'] == 1 ) {
    209                     $ttl = $settings ['default-ttl'] ?: 86400;
    210                 } else {
    211                     $ttl = 0;
    212                 }
    213             }
     220            } else if (isset ( $settings ['fastcache_cdn_default_ttl_notfound_set'] ) && $settings ['fastcache_cdn_default_ttl_notfound_set'] == 1 ) {
     221                /*
     222                 * altrimenti SE
     223                * se ho un impostato il flag tale per cui in caso di NON ttl imposto il default
     224                 * FASTCACHE_DEFAULTTTL
     225                 */
     226               
     227                    $ttl = $settings ['default-ttl'] ?: FASTCACHE_DEFAULTTTL;
     228            }
     229           
    214230        }
    215231        if (is_feed ()) {
Note: See TracChangeset for help on using the changeset viewer.