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’ll 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 · May be fixed by #3017
Open
3 tasks done

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

bpatyi opened this issue Mar 28, 2024 · 2 comments · May be fixed by #3017

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
@efectn efectn linked a pull request May 29, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants