roadrunner icon indicating copy to clipboard operation
roadrunner copied to clipboard

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

Open Warxcell opened this issue 6 months ago • 7 comments

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.

Warxcell avatar Aug 09 '24 08:08 Warxcell