Skip to content

[💡 FEATURE REQUEST]: Static HTTP middleware, immutable option. #1985

@Warxcell

Description

@Warxcell

Plugin

HTTP Middleware (any)

I have an idea!

it would be cool if static HTTP middleware have option immutable - so when turned on - it would scan all files in root dir on startup and cache their properties in memory, so with that option roadrunner won't need Static HTTP middleware slows down request processing by ~10% because RR has to check each request for the corresponding file.
thus enabling static http middleware, will have zero performance impact. Furthermore it can be used to send https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control immutable option.

image

Because some projects may run inside docker with read-only filesystem, so roadrunner can be 100% sure that files WON'T change after startup.

Metadata

Metadata

Assignees

Labels

C-feature-acceptedCategory: Feature discussed and accepted

Type

No type

Projects

Status

📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions