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

Enhancements for global.fetch #1

Closed
mjackson opened this issue Oct 27, 2020 · 4 comments
Closed

Enhancements for global.fetch #1

mjackson opened this issue Oct 27, 2020 · 4 comments

Comments

@mjackson
Copy link
Member

A few small enhancements I'd like to make to the global.fetch we provide in node:

  • Use { compress: false } by default. This lets people more easily return the result of a fetch directly from a data loader with the proper encoding.
  • Use the .cache/fetch directory by default for caching fetch results. In a long-running server process, this can really speed up the results of a fetch.
@tikotzky
Copy link

The cache backend should probably be configurable like https://github.com/npm/make-fetch-happen#--optscachemanager

This would help when deploying to a serverless environment where the filesystem will likely not be shared across requests.

@mjackson
Copy link
Member Author

Yep, agree 100% @tikotzky. I'm thinking we can add a config.cache option to remix.config.js that works like make-fetch-happen's cacheManager option.

@mjackson
Copy link
Member Author

FWIW I included a disk-based cache by default in v0.6.0 but had to roll it back in v0.6.1 because 304's weren't being handled properly (returning null for the data in loaders). Still need to investigate further.

@ryanflorence
Copy link
Member

#8 (comment)

@benwis benwis mentioned this issue Apr 13, 2021
kentcdodds pushed a commit that referenced this issue Jul 22, 2022
* S3 file upload (#1)

* Implemented S3 upload

* Updated README

* Cleaned up dependencies

* Revert "S3 file upload (#1)" (#2)

This reverts commit df2359c.

* S3 file upload (#3)

* Implemented S3 upload

* Updated README

* Cleaned up dependencies

* Update contributors.yml

* S3 file upload (#4)

* Implemented S3 upload

* Updated README

* Updated README

* Cleaned up dependencies

* Fixed dependencies

* Refactored from useActionData to useFetcher
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

No branches or pull requests

3 participants