Are you reading my mind? Always when I have a project where I need a specific answer video too, I see you uploaded a video to it a few hours or days ago, which nails the topic directly and helps a lot! Thank you mate.
@TheAlexLichterАй бұрын
What a timing! Really glad that my content was there right when you needed it 😁
@da-ker2 ай бұрын
Very nice introduction to caching options. Thank you!
@TheAlexLichterАй бұрын
Thanks 🙏🏻
@jdaws472 ай бұрын
Thank you for your videos. They have been a tremendous help on a project I’m working on.
@TheAlexLichterАй бұрын
Happy they could help you 🙏🏻
@sludgebucket30422 ай бұрын
I had no idea this was all doable within Nitro, going to set this up asap
@gabrielserejo83792 ай бұрын
Thanks for the video Alex!
@TheAlexLichterАй бұрын
You are welcome 👏🏻
@web-code-maker2 ай бұрын
Всё очень понятно и классно рассказал. Спасибо друг
@DanielLuchin2 ай бұрын
This is super useful! Thanks
@TheAlexLichterАй бұрын
Glad you think so!
@jitxhere2 ай бұрын
Wow this is amazing. I have used hono but unjs seems good too..
@TheAlexLichterАй бұрын
It really is! Give it a try 🔥
@ralacerda122 ай бұрын
Amazing video! Nitro keeps blowing my mind on how simple it's to get it running and doing complex stuff. But a question not totally related to the video, but if you build a project like this for nitro (stand alone) and you want to use with an spa (without nuxt or even without vue), how can I get the types from the nitro project? Do I need to setup a monorepo?
@TheAlexLichterАй бұрын
Thank you 🙏🏻 Yeah, that's a bit more tricky. I hope I can make a video on that soon
@gro9672 ай бұрын
Used Nitro caching the first time two years ago, was about time someone exposes that to the world :)
@mustafa60x2 ай бұрын
thanks
@TheAlexLichterАй бұрын
No problem!
@solvedfyi2 ай бұрын
I suppose if you're gonna keep bringing up stuff super relevant to me I'm just going to have to subscribe
@TheAlexLichterАй бұрын
I wouldn't mind that 😛 Thanks for the sub!
@nanaassumadu49972 ай бұрын
This is awesome
@TheAlexLichterАй бұрын
Right? 🙌
@impactsongs2 ай бұрын
Greate Alexander! Thank you for the good tutorials. I have a question because i use cache in Nitro alot. How can i access a url parameter or slug inside a Info.server.vue component example. Because if i use useRoute() it is empty. I ask that because when i want to access something function from server i use Nitro and with this i can make a call directly from my server component.
@TheAlexLichterАй бұрын
(Answered in the more recent comment, sorry that I missed this one!)
@hbrd26 күн бұрын
Great video. Do you have any advice on how to set up Nitro endpoint in Nuxt to only request on buildtime (in Nuxt SSR) and then always use the cached response until next deploy (I am using Netlify)? My use case is I have a Nitro endpoint to generate image thumbnails via thumbhash and those obviously never change for a given image. So ideally I would only generate them once on deploy and in production it would use the cached version (indefinitely) until next deploy. I thought of an arbitrary maxAge settings, but doing something like "maxAge: Infinity" seems weird to me. Thank you!
@TheAlexLichter26 күн бұрын
Sure! You can also use the prerender route rule for the path 👌
@hbrd26 күн бұрын
@@TheAlexLichter Thanks for the reply. Prerender as in nitro.prerender or routeRules: { "...": {prerender: true}}? It gets confusing real quick as some of the settings are aliases for Nitro config and some are not. Also, can you set up some sort of a crawler to prerender all found endpoints rather than specifying all paths to images manually?
@TheAlexLichter24 күн бұрын
As route rule (2nd option) 👌 Hmm, not sure about the 2nd part. The Nuxt crawler will crawl a lot of the pages when found but maybe it'd be great to have a way to specify/customize this behavior to also add images and similar. How about raising an issue in nuxt/nuxt about that? 😊
@assoftTR2 ай бұрын
Next goal rate limiter?
@HEX_CAT2 ай бұрын
❤❤❤🎉🎉🎉
@paradox3210Ай бұрын
Is it possible to use a catch-all route (server/api/[...].ts) and a specific route rule in the config at the same time? I want to cache one particular route (/api/settings) 🤔
@TheAlexLichterАй бұрын
Then you'd need a dedicated /api/settings.ts file (which can do the same as the catch-all) - yes.
@LajonDJАй бұрын
@TheAlexLichter Is there a way to get all caches in a Nitro/Nuxt app? My use case is that I would like to build an admin interface, where you can invalidate caches :)
@TheAlexLichterАй бұрын
You certainly can. NuxtHub is also doing that 👌🏻
@LoFiLanes2 ай бұрын
How to do cache with handler with auth ? if i use const session = await requireUserSession(event) from (Nuxt Auth Utils) inside, it doesn't work ( i use Nuxthub)
@atinux2 ай бұрын
The cache is by-passed if we detect an authenticated request to avoid cross request state pollution.
@LoFiLanes2 ай бұрын
@@atinux Thank you, so i can't cache ? ( with other way) , i shoud never cache auth request ?
@atinux2 ай бұрын
No you should not cache Auth request. But you can cache functions inside using defineCachedFunction
@LoFiLanes2 ай бұрын
@@atinux Thank you
@TheAlexLichterАй бұрын
Nothing to add here 🔥
@undertale-15075O2 ай бұрын
Больная тема. Когда внезапно узнали что swr не работает в Netlify
@TheAlexLichter2 ай бұрын
That sounds like a bug! Is there an open nitro issue?
@paranoidPhantom2 ай бұрын
На vercel вроде порядок
@undertale-15075O2 ай бұрын
@@paranoidPhantom ну так это одно, а это другое
@DanielLuchin2 ай бұрын
@@paranoidPhantom на vercel не работает ISR.. Если добавить параметры в Get запрос - они игнорируются :(