LiteSpeed Enterprise | 1412 https://xvlnw.com I'm on my way Tue, 09 Mar 2021 12:09:10 +0000 th hourly 1 https://wordpress.org/?v=5.5.13 การใช้ .htaccess เปิดใช้งาน lscache ใน Litespeed https://xvlnw.com/topic/811 Tue, 09 Mar 2021 12:08:47 +0000 https://xvlnw.com/?p=811 โค๊ดอย่างง่าย สำหรับเปิดใช้งาน lscache ด้วย .htaccess ครับ วิธีตรวจสอบ ใช้ลองใช้งาน Debug header ดู แล้วหาค่า “x-litespeed-cache:” จะโชว์ขึ้นมา แสดงว่าโค๊ดเริ่มทำงานแล้ว จากตัวอย่างด้านบน คือทำการตั้งค่าแคชไว้ที่ 3600 วินาที หรือ 1 ชั่วโมงครับ

The post การใช้ .htaccess เปิดใช้งาน lscache ใน Litespeed first appeared on 1412.]]>
โค๊ดอย่างง่าย สำหรับเปิดใช้งาน lscache ด้วย .htaccess ครับ

<IfModule LiteSpeed>
RewriteEngine On
CacheEngine on esi crawler
CacheEnable public /
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteRule .* - [E=Cache-Control:max-age=3600]
</IfModule>

วิธีตรวจสอบ ใช้ลองใช้งาน Debug header ดู แล้วหาค่า “x-litespeed-cache:” จะโชว์ขึ้นมา แสดงว่าโค๊ดเริ่มทำงานแล้ว

จากตัวอย่างด้านบน คือทำการตั้งค่าแคชไว้ที่ 3600 วินาที หรือ 1 ชั่วโมงครับ

The post การใช้ .htaccess เปิดใช้งาน lscache ใน Litespeed first appeared on 1412.]]>
cf-edge-cache: cache,platform=wordpress https://xvlnw.com/topic/781 Tue, 08 Dec 2020 11:20:51 +0000 https://xvlnw.com/?p=781 หลังจากที่เปลี่ยนมาใช้ LiteSpeed Enterprise พบว่าการส่ง Header จาก Cloudflare เปลี่ยนไป การแคชข้อมูลเป็บแบบสำหรับ Cloudflare WordPress Caching โดยเฉพาะเลย เพราะว่าตัว Cloudflare ทำงานร่วมกับ LiteSpeed Enterprise ได้ดีนั่นเอง Header ที่ส่งกลับมา ลองดูว่าต้องมี 3 ค่านี้ส่งกลับมาที่ Client นะครับ วิธีก…

The post cf-edge-cache: cache,platform=wordpress first appeared on 1412.]]>
หลังจากที่เปลี่ยนมาใช้ LiteSpeed Enterprise พบว่าการส่ง Header จาก Cloudflare เปลี่ยนไป การแคชข้อมูลเป็บแบบสำหรับ Cloudflare WordPress Caching โดยเฉพาะเลย เพราะว่าตัว Cloudflare ทำงานร่วมกับ LiteSpeed Enterprise ได้ดีนั่นเอง

Header ที่ส่งกลับมา

cf-edge-cache: cache,platform=wordpress
x-litespeed-cache: hit
cf-cache-status: HIT

ลองดูว่าต้องมี 3 ค่านี้ส่งกลับมาที่ Client นะครับ วิธีการเช็ค Header ง่ายๆ ก็ใช้ Command line : curl

curl -Iv https://cloudhost.in.th

สำหรับการทดสอบกับ OpenLiteSpeed จะไม่พ่น cf-edge-cache ออกมาครับ ซึ่งก็คาดว่าจะรองรับเฉพาะเวอร์ชั่น LiteSpeed Enterprise เท่านั้น

สำหรับใครที่อยากจะเซตแบบนี้ CloudHost.in.th มีบริการเซตให้ฟรี รองรับ 1 Domain เท่านั้น ดูบริการ Cloud Server สำหรับ WordPress Hosting ได้ที่ลิงก์ด้านล่างนี้

The post cf-edge-cache: cache,platform=wordpress first appeared on 1412.]]>