Hello,
I am working on a project where I need an SSI/ESI like feature. For full page cache I am now using the srcache-nginx-module with Redis and a PHP backend. There will be at least 3 blocks per page which I need whole-punched with something like SSI/ESI and these will also be cached.
SSI does not play well with Lua, on the other hand if I am using SSI with srcache_fetch only then it won't work on my sub-requests.
What would be a good (elegant and also performance wise) approach to replace SSI/ESI tags in both the backend and srcache_fetch responses? Liked replace-filter-nginx-module, but it does not support Lua replacements which I need. Any ideas or solutions are welcome.
I've done some research and testing, but none worked so far:
* Use a template engine - no buffer and how to process cached responses
* use body_filter_by_lua would fail when chunk ends in the middle of a placeholder
Thank you in advance!
PS: I've posted this also in the srcache issues on Github, @agentzh was kind to give me answer already and suggested to ask here too: https://github.com/openresty/srcache-nginx-module/issues/35