Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摑 [Proposal]: Allow disabling cache for ctx.SendFile() #2945

Open
3 tasks done
bpatyi opened this issue Mar 28, 2024 · 2 comments
Open
3 tasks done

馃摑 [Proposal]: Allow disabling cache for ctx.SendFile() #2945

bpatyi opened this issue Mar 28, 2024 · 2 comments

Comments

@bpatyi
Copy link

bpatyi commented Mar 28, 2024

Question Description

hello. Is there any way to turn off the ctx.SendFile cache? In our project, we further distribute files to devices in chunks, which can change every second. If I understand the code correctly, it is currently fixed to cache for 10 seconds, which causes it to arrive incorrectly. Thanks for your help.

Code Snippet (optional)

No response

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my questions prior to opening this one.
  • I understand that improperly formatted questions may be closed without explanation.
@gaby
Copy link
Member

gaby commented Mar 30, 2024

@bpatyi This would need to be added as a feature in v3. The filesystem middleware problably needs the same feature.

@gaby
Copy link
Member

gaby commented Mar 30, 2024

While we are at it, there's no unit-tests for the compress param.

https://github.com/gofiber/fiber/blob/main/ctx_test.go

@gaby gaby changed the title 馃 [Question]: Can I disable SendFile cache? 馃 [Question]: Allow disabling cache with ctx.SendFile() Mar 30, 2024
@gaby gaby added this to the v3 milestone Mar 30, 2024
@gaby gaby changed the title 馃 [Question]: Allow disabling cache with ctx.SendFile() 馃摑 [Proposal]: Allow disabling cache for ctx.SendFile() Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants