Skip to content

Perf/http cache opcache - #215

Open
novashdima wants to merge 2 commits into
misterunknown:masterfrom
novashdima:perf/http-cache-opcache
Open

Perf/http cache opcache#215
novashdima wants to merge 2 commits into
misterunknown:masterfrom
novashdima:perf/http-cache-opcache

Conversation

@novashdima

Copy link
Copy Markdown
Contributor

perf: HTTP conditional requests for downloads, opcache in Docker

  • fileDownload: emit ETag (mtime+size) and Last-Modified for files
    served via the download/proxy API and answer If-None-Match /
    If-Modified-Since with a bodyless 304
  • Cache-Control "private, no-cache": browsers keep a copy but always
    revalidate, so previews stay fresh while repeated views of unchanged
    files cost only a header exchange
  • generated archives (zipnload) keep the old headers: a one-off tmp
    file has nothing to revalidate
  • Docker: enable opcache for the built-in server via php.ini; the app
    is a single ~1.5 MB generated PHP file that was re-parsed on every
    request without it (opcache itself is compiled into PHP statically
    since 8.5, nothing to install)

novashdima and others added 2 commits August 3, 2026 02:00
- fileDownload: emit ETag (mtime+size) and Last-Modified for files
  served via the download/proxy API and answer If-None-Match /
  If-Modified-Since with a bodyless 304
- Cache-Control "private, no-cache": browsers keep a copy but always
  revalidate, so previews stay fresh while repeated views of unchanged
  files cost only a header exchange
- generated archives (zipnload) keep the old headers: a one-off tmp
  file has nothing to revalidate
- Docker: install and enable opcache for the built-in server; the app
  is a single ~1.5 MB generated PHP file that was re-parsed on every
  request without it

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@misterunknown

Copy link
Copy Markdown
Owner

Thanks for the contribution, this looks good to me. I will merge it once I merged my own branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants