xe-hook-fpc is a very simple full page cache handler for xpressengine with memcached. Note that it is not a module or addon. It purpose is to improving performance of very heavy xpressengine. This program has some problems such as hits increasing and list updating. So you should be taken into account carefully. Have a good luck:)
- Xpressengine(1.7.4+)
- Memcached
shell> vi [Installed xpressengine path]/files/config/db.config.php
'use_object_cache' => 'memcache://localhost:11211'
shell> git clone git://github.com/vozlt/xe-hook-fpc.git
shell> cd xe-hook-fpc
shell> bash install.sh install [Installed xpressengine path]
shell> cd xe-hook-fpc
shell> bash install.sh uninstall [Installed xpressengine path]
Actions | Disable | Enable |
---|---|---|
document | 7177 | 518 |
list | 4862 | 455 |
This analysis was using xhprof.
Actions | expires(sec) |
---|---|
index | 300 |
list | 3600 |
document | 3600 |
comment | 3600 |
searched result | 3600 |
menu | 3600 |
Cache expiration setting file path(If the value is set to 0, will be not cache.)
shell> vi [Installed xpressengine path]/config/config.user.inc.php
define('__XE_HOOK_FPC_INDEX_EXPIRES__', 300); /* index's cache expires time(sec) */
define('__XE_HOOK_FPC_LIST_EXPIRES__', 3600); /* list's cache expires time(sec) */
define('__XE_HOOK_FPC_DOCUMENT_EXPIRES__', 3600); /* document's cache expires time(sec) */
define('__XE_HOOK_FPC_COMMENT_EXPIRES__', 3600); /* comment's cache expires time(sec) */
define('__XE_HOOK_FPC_SEARCH_EXPIRES__', 3600); /* searched result's cache expires time(sec) */
define('__XE_HOOK_FPC_MENU_EXPIRES__', 3600); /* menu's cache expires time(sec) */
shell> vi layouts/[your layout path]/layout.html
<!--fpc:debug_info:s--><!--fpc:debug_info:e-->
If xe-hook-fpc is enabled will be displayed as follow.
<!--debug_info{fpc:pc:ProcCacheDocument:board:1:0:login}-->
YoungJoo.Kim [vozltx@gmail.com]