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

Question of Server Side Caching #465

Closed
sarukuku opened this issue Dec 21, 2016 · 5 comments
Closed

Question of Server Side Caching #465

sarukuku opened this issue Dec 21, 2016 · 5 comments
Assignees

Comments

@sarukuku
Copy link

Does next support any kind of server side caching?

  • a) If it does how can I configure it?
  • b) If it doesn't could something like f.ex. apicache be used with relative ease?

In my use case I'm making quite a few requests to different API endpoints and the server waits for them to return to be able to set the initial state of the application. In minimum I'd like to cache the API responses for some time so that the server wouldn't need to call the API on every request. If caching the whole request result is possible that would be even better.

@arunoda
Copy link
Contributor

arunoda commented Dec 21, 2016

With Next.js you probably wanna use a your own version of API server.
So, in this case it's up to you to do any caching.

If you are using Next.js custom server feature, you can do anything you want.
You can even cache SSR pages.

@arunoda arunoda closed this as completed Dec 21, 2016
@sarukuku
Copy link
Author

My API is on a different server and caching there has been taken care of. I'm more interested in implementing caching for SSR pages.

I've read about the custom server feature and understand that it allows me to do pretty much what I want but I'm looking for suggestions. What would work best with next or does it matter from next perspective how I tackle this?

@arunoda
Copy link
Contributor

arunoda commented Dec 23, 2016

Okay. I think we need an example on SSR caching. I'll work on it.

@arunoda arunoda reopened this Dec 23, 2016
@arunoda arunoda self-assigned this Dec 23, 2016
@arunoda
Copy link
Contributor

arunoda commented Dec 23, 2016

Check this: #497

@arunoda arunoda closed this as completed Dec 23, 2016
@sarukuku
Copy link
Author

Excellent!

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants