{"id":11942,"date":"2017-04-20T22:31:26","date_gmt":"2017-04-20T20:31:26","guid":{"rendered":"https:\/\/xlogic.org\/blog\/?p=11942"},"modified":"2023-12-29T11:56:24","modified_gmt":"2023-12-29T10:56:24","slug":"joomla-drupal-prestashop-al-top-lscache-litespeed","status":"publish","type":"post","link":"https:\/\/xlogic.org\/blog\/joomla-drupal-prestashop-al-top-lscache-litespeed.html\/","title":{"rendered":"Joomla, Drupal e Prestashop al Top con LSCache di Litespeed"},"content":{"rendered":"<p>Dopo aver presentato il nuovo sistema di cache di <strong>litespeed<\/strong> per wordpress:<a href=\"https:\/\/xlogic.org\/blog\/wordpress-al-top-lscache-litespeed.html\/\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress al Top con LSCache di Litespeed<\/a>\u00a0da oggi \u00e8 possibile abilitare LSCache anche per Joomla, Drupal e Prestashop.<\/p>\n<p>LSCache sviluppato dalla Litespeed \u00e8 simile a <strong>Varnish Cache<\/strong> ma pi\u00f9 efficiente e permette di aggiungere in cache le pagine dei CMS aumentando di molto la velocit\u00e0 di apertura delle pagine di circa del 50%.<\/p>\n<p>La Xlogic \u00e8 stata la prima azienda Italiana ad utilizzare Litespeed sui propri server e la prima ad utilizzare LSCache per WordPress (<span class=\"goog-text-highlight\">Supporta <\/span><strong><span class=\"goog-text-highlight\">WooCommerce<\/span><\/strong><span class=\"goog-text-highlight\"> a partire dalla versione 1.0.3.<\/span>) LSCache \u00e8 incluso in tutti i piani Hosting ed \u00e8 gratuito.<\/p>\n<p>Per quanto riguarda wordpress ricordo che ogni notte il sistema scansiona i server alla ricerca di nuove installazioni wordpress, una volta rilevate le nuove installazioni viene attivato il plugin <strong>LSCache<\/strong>, ovviamente se rileva che sono attivi altri plugin di cache bypassa l&#8217;installazione.<\/p>\n<p>Mentre per wordpress \u00e8 gi\u00e0 disponibile un plugin per LSCache, per gli altri CMS il plugin o modulo \u00e8 in fase di sviluppo, ma \u00e8 possibile attivare la cache tramite un codice da aggiungere nel file <strong>.htaccess<\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Attivare LSCache in Joomla<\/strong><\/h3>\n<p>Per attivare LSCache in Joomla aggiungere il codice nel file.htaccess prima della linea:<\/p>\n<pre>## Begin - Joomla! core SEF Section.<\/pre>\n<p>Soluzione 1: Cache per tutti gli URL ad esclusione dell&#8217;URL &#8220;\/administrator&#8221;<\/p>\n<pre>########## Begin - Litespeed cache\r\n\r\n  RewriteEngine On\r\n  CacheDisable public \/\r\n  RewriteCond %{REQUEST_METHOD} ^HEAD|GET$\r\n  RewriteCond %{ORG_REQ_URI} !\/administrator\r\n  RewriteRule .* - [E=Cache-Control:max-age=120]\r\n\r\n########## End - Litespeed cache<\/pre>\n<p>Soluzione 2: Cache per tutti gli URL ad eccezione di quelli specificati<\/p>\n<pre>########## Begin - Litespeed cache\r\n\r\n  RewriteEngine On\r\n  CacheEnable public \/\r\n  RewriteCond %{REQUEST_METHOD} ^HEAD|GET$\r\n  RewriteCond %{ORG_REQ_URI} \/administrator\/\r\n  RewriteRule .* - [E=Cache-Control:no-cache]\r\n\r\n########## End - Litespeed cache<\/pre>\n<p>Soluzione 3: Cache per domini specifici<\/p>\n<pre>########## Begin - Litespeed cache\r\n\r\n RewriteEngine On\r\n RewriteCond %{REQUEST_METHOD} ^HEAD|GET$\r\n RewriteCond %{HTTP_HOST} ^domain.com [NC] [OR]\r\n RewriteCond %{HTTP_HOST} ^www.domain.com [NC]\r\n RewriteCond %{ORG_REQ_URI} !\/administrator\r\n RewriteRule .* - [E=Cache-Control:max-age=120]\r\n\r\n########## End - Litespeed cache<\/pre>\n<p>&nbsp;<\/p>\n<h3><strong>Attivare LSCache in Drupal<\/strong><\/h3>\n<p>Inserire il codice seguente all&#8217;inizio del file .htaccess:<\/p>\n<pre>########## Begin - Litespeed cache\r\n\r\n  CacheLookup public on\r\n  RewriteEngine On  \r\n  RewriteCond %{REQUEST_METHOD} ^GET|HEAD|PURGE$\r\n  RewriteCond %{HTTP_HOST} ^your_domain_name.com [NC]\r\n  RewriteCond %{REQUEST_URI} !admin|register|login [NC]\r\n  RewriteCond %{HTTP_COOKIE} !SESS [NC]\r\n  RewriteCond %{QUERY_STRING} !nocache\r\n  RewriteRule .* - [E=Cache-Control:max-age=120]\r\n\r\n########## End - Litespeed cache<\/pre>\n<p>&nbsp;<\/p>\n<h3><strong>Attivare LSCache in Prestashop<\/strong><\/h3>\n<p>Inserire il codice seguente all&#8217;inizio del file .htaccess:<\/p>\n<pre>########## Begin - Litespeed cache\r\n\r\n  CacheLookup public on\r\n  RewriteEngine On\r\n  RewriteCond %{REQUEST_METHOD} ^GET|HEAD|PURGE$\r\n  RewriteCond %{HTTP_HOST} ^your_domain_name.com [NC]\r\n  RewriteCond %{REQUEST_URI} !admin_folder|404|address|authentication|best-sales|cart|contact|discount|guest-tracking|history|identity|order|password|products-comparison|search|account|friend|login|logout|addresses|contact-us|order-history|my-account|order-confirmation|order-follow|quick-order|credit-slip|password-recovery [NC]\r\n  RewriteCond %{HTTP_COOKIE} !logged|cart [NC]\r\n  RewriteCond %{QUERY_STRING} !nocache [NC]\r\n  RewriteRule .* - [E=Cache-Control:max-age=900]\r\n\r\n########## End - Litespeed cache<\/pre>\n<p>&nbsp;<\/p>\n<h3><strong>Come verificare se la Cache \u00e8 attiva<\/strong><\/h3>\n<p>Apri il browser Chrome, clicca con il tasto destro del mouse su &#8220;<strong>Ispeziona<\/strong>&#8220;, clicca su <strong>&#8220;Network&#8221;<\/strong> aggiorna la pagina, clicca sulla pagina html in basso a destra, nell&#8217;intestazione dell&#8217;header se la cache \u00e8 attiva verr\u00e0 visualizzata la voce <strong>&#8220;X-LiteSpeed-Cache: hit&#8221;<\/strong>, se viene visualizzata la voce <strong>&#8220;X-LiteSpeed-Cache: miss&#8221;<\/strong> ricaricare la pagina e riprovare.<\/p>\n<p>&nbsp;<\/p>\n<p>Alla Prossima.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dopo aver presentato il nuovo sistema di cache di litespeed per wordpress:WordPress al Top con LSCache di Litespeed\u00a0da oggi \u00e8 possibile abilitare LSCache anche per Joomla, Drupal e Prestashop. LSCache sviluppato dalla Litespeed \u00e8 simile a Varnish Cache ma pi\u00f9 efficiente e permette di aggiungere in cache le pagine dei CMS aumentando di molto la [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"no","_lmt_disable":"","footnotes":""},"categories":[5,1404,1402,1419,1403],"tags":[745,37,1311,1313,1315,1314,1312],"class_list":["post-11942","post","type-post","status-publish","format-standard","hentry","category-news","category-drupal","category-joomla","category-performance-e-sicurezza","category-prestashop","tag-cache-wordpress","tag-hosting-wordpress","tag-lscache","tag-lscache-joomla","tag-lscache-prestashop","tag-lscachedrupal","tag-wordpress-top"],"modified_by":"Andrea (Xlogic.org)","_links":{"self":[{"href":"https:\/\/xlogic.org\/blog\/wp-json\/wp\/v2\/posts\/11942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlogic.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlogic.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlogic.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlogic.org\/blog\/wp-json\/wp\/v2\/comments?post=11942"}],"version-history":[{"count":0,"href":"https:\/\/xlogic.org\/blog\/wp-json\/wp\/v2\/posts\/11942\/revisions"}],"wp:attachment":[{"href":"https:\/\/xlogic.org\/blog\/wp-json\/wp\/v2\/media?parent=11942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlogic.org\/blog\/wp-json\/wp\/v2\/categories?post=11942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlogic.org\/blog\/wp-json\/wp\/v2\/tags?post=11942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}