Introducing the “Theme Accelerator” in the KUSANAGI Plugin

謝 永佳

Prime Strategy’s KUSANAGI Plugin has been updated with a new feature: the Theme Accelerator

This functionality improves backend performance by caching frequently reused and rarely changed theme data—including certain Full Site Editing (FSE) components—allowing themes to load faster and respond more efficiently. 

The accelerator activates only under specific conditions and supports the creation and deletion of cache data as needed. Performance testing has shown a reduction in page access time ranging from 9.2% to 55.3% for general themes, and 9.7% to 10.9% for FSE themes, significantly supporting faster and more efficient website operation. 

This feature was introduced in KUSANAGI Plugin version 20230705-1. I’m Xie from the Prime Strategy KUSANAGI development team, and in this article, I’ll walk you through how the Theme Accelerator works. 

What Is the “Theme Accelerator”?

The Theme Accelerator is a feature designed to speed up backend processing for websites without relying on full-page caching.It was developed based on in-depth analysis of theme data structures and rendering processes. 

This analysis revealed that certain theme elements—specifically, commonly reused and rarely updated data, as well as parts of Full Site Editing (FSE) themes—can be cached to significantly boost performance. 

Activation Requirements

To use the Theme Accelerator, the following condition must be met: 

  • Enable it from the WordPress admin dashboard 
    Navigate to: 
    KUSANAGI → Advanced → Theme Accelerator
  • Enabling APCu 
  • The request is made from the frontend (not admin panel) 
  • The HTTP method is GET 
  • The HTTP response code is 200 OK 

How It Works

As mentioned earlier, the Theme Accelerator currently performs partial caching on two key areas: 

  1. Theme header and footer data 
  2. Full Site Editing (FSE) theme structure data 

Let’s break that down further: 

  • For non-FSE themes, the accelerator caches data from hooks used in the theme’s header and footer. 
    Specifically, it caches hook data whose names include “head” or “foot”, but do not include “admin” in the name. 
  • For FSE themes, the structure information is not fetched from the database
    Instead, it is stored in cache to reduce database access, minimizing overhead when retrieving theme layout details. 

Note: The FSE-related functionality is only effective if the active theme is an FSE theme. 

Measuring Effectiveness

You can verify the performance improvements by reviewing the environment details and measuring access times before and after enabling the Theme Accelerator. 

Platform Microsoft Azure 
Region East Japan 
Instance Standard_B2ms 
CPU Intel(R) Xeon(R) Platinum 8272CL @ 2.60GHz (2 vCPUs) 
Memory 8 GiB 
Disk Standard HDD LRS, 30 GiB 
Operating System AlmaLinux 8.8 
Middleware Nginx 1.23.4 
PHP 8.1.20 
MariaDB 10.5 
WordPress 6.2.2 
General Theme GeneratePress 3.3.0 
FSE Theme x-t9 1.17.1 
Data Copy of our corporate website 

Test Conditions and Results 

条件

Test Method 4 threads, 1000 loop requests per URL 
Metric Median response time 
Target URLs – List Page: https://www.prime-strategy.co.jp/en/achievements/page/3/  
– Detail Page: https://www.prime-strategy.co.jp/achievements/yamaha_myujin/ 

Measurement Results (Median Response Time) 

Condition List Page (General Theme) Detail Page (General Theme) List Page (FSE Theme) Detail Page (FSE Theme) 
WAF/Cache Disabled 2142 ms (0% reduction) 1304 ms (0%) 1281 ms (0%) 1426 ms (0%) 
Header/Footer Only 1204 ms (43.8% reduction) 1032 ms (20.9%) 1178 ms (8.0%) 1372 ms (3.8%) 
All Features Enabled 957 ms (55.3% reduction) 1184 ms (9.2%) 1141 ms (10.9%) 1287 ms  

Confirmed Performance Gains 

Testing has shown that the Theme Accelerator reduces page access time by: 

  • 9.2% to 55.3% for general (non-FSE) themes 
  • 9.7% to 10.9% for FSE (Full Site Editing) themes 

Actual results may vary depending on your site’s data, structure, and network environment. 

How to Clear Cached Data

If you want to clear the Theme Accelerator’s cached data, you can simply disable the setting in the WordPress admin panel under KUSANAGI → Other → Theme Accelerator, and then re-enable it. 
This will delete all previously stored cache entries. 

Final Notes

The Theme Accelerator only caches data for certain hooks under specific conditions. Depending on how your theme is structured, you may see minimal impact

That said, this feature does not alter your site’s data, so we strongly encourage you to update your KUSANAGI Plugin to the latest version and try enabling it

If you encounter any bugs or unexpected behavior, please report them to the KUSANAGI User Group

<< Protecting Your Site with kusanagi waf (ModSecurity/NAXSI) Using PostgreSQL with KUSANAGI 9 >>

関連記事

Webサイト運用の課題解決事例100選 プレゼント

Webサイト運用の課題を弊社プロダクトで解決したお客様にインタビュー取材を行い、100の事例を108ページに及ぶ事例集としてまとめました。

・100事例のWebサイト運用の課題と解決手法、解決後の直接、間接的効果がわかる

・情報通信、 IT、金融、メディア、官公庁、学校などの業種ごとに事例を確認できる

・特集では1社の事例を3ページに渡り背景からシステム構成まで詳解