openresty / openresty/srcache-nginx-module

What to use for SSI/ESI like feature?

Open
#35 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
486
Forks
101
Avg merge
1h 28m
Merged PRs (30d)
2

Description

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.

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!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the issue's constraints around srcache_fetch, Redis-cached responses, SSI/ESI, and body_filter_by_lua, then compare them with replace-filter-nginx-module. The work is not scoped to a file or test; done would mean identifying or implementing an approach that replaces placeholders across backend and cached subrequest responses while supporting Lua replacements.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx, php, redis
Domain
backend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.