-
-
Notifications
You must be signed in to change notification settings - Fork 204
ISR: Render behaves differently between render / regenerate / invalidate #1758
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
Comments
Yes, that would be great! Thanks for doing all this! I will make sure to review and merge everything! |
Thanks! Your library is really awesome. So my current plan is rename regeneration to generation and add another param for different mode, since they actually behave a little different. But I might change my mind after working on this a bit more. I plan to do this one first and then #1755 Welcome to give me any suggestion. |
I think we shouldn't have 2 different configs to modify the html for serveFromCache and render
I understand the need to have a way to serve different variant of a page, but variants to do that already. with 2 different configurations, we have to provide render config here (which is missing currently) rx-angular/libs/isr/server/src/isr-handler.ts Lines 209 to 217 in 3f91916
If we only allow one config for that, we can just add providers and modifyCachedHtml to ISRConig and use the ISRConfig for everything. Any thought? |
Actually, I think I can still preserve modifyCachedHtml in ServeFromCacheConfig to avoid breaking change. But I think we have to add modifyGeneratedHtml in ISRHandlerConfig |
I push a commit to show the idea. I will test it more tomorrow but I think it should work. It does change a lot of code so feel free to give me some feedback. |
) * refactor(isr): rename CacheRegeneration to CacheGeneration * refactor(isr): rename CacheRegeneration to CacheGeneration * fix(isr): handle modifyGeneratedHtml behavior consistantly #1758 * refactor(isr): use modifyGeneratedHtml instead * feat(isr): update the example to show modifyGeneratedHtml usage
this is done |
Uh oh!
There was an error while loading. Please reload this page.
Description
only render has feature for
modifyGeneratedHtml
, it is missing from the other twoI think the issue here is we should consolidate the render function a bit more.
also with modifyGeneratedHtml, I think there is no need for
cacheMsg
in InMemoryCacheHandlerWe can have a default
modifyGeneratedHtml
function just like cacheMsgNotes
I will try to fix this in my fork, if you like the proposed solution, I will make a PR.
Sorry making a bunch of changes in a short time, I am trying to port our existing feature to this library. My goal is trying to match the upstream as much as possible.
The text was updated successfully, but these errors were encountered: