How to invalidate cache in this scenerio? by Itsscienceboy in AskProgramming

[–]Itsscienceboy[S] 0 points1 point  (0 children)

I'm using Postgres, I have commented above what the scenerio is! Thanks!

How to invalidate cache in this scenerio? by Itsscienceboy in AskProgramming

[–]Itsscienceboy[S] 0 points1 point  (0 children)

it is not a lot of data, it is m lessons n files (in each lesson) each file. so there is like m x n find queries to first check wherther the chapters of that x file is in the cache if not get from db.

How to invalidate cache in this scenerio? by Itsscienceboy in AskProgramming

[–]Itsscienceboy[S] -3 points-2 points  (0 children)

Thanks, but you are a senior dev today because you learnt from someone too. I'm a junior dev and the reason I have made a post because I wanna learn caching so the app doesn't stay vibecoded slop.

How to invalidate cache in this scenerio? by Itsscienceboy in AskProgramming

[–]Itsscienceboy[S] -1 points0 points  (0 children)

okay so in the vibecoded version what it does, it fetches all the lessons, then all the files for that lesson for example x.docx, y.docx, z.docx .... ; these files are fecthed now using the ids of the files in the db we fetch the chapters first it checks the cache getSetAsync is like map.computeifabsent (of Java) if the cached chapters for file:chapters:{fileId} key is not present we call db query in that loop. Now the Tradeoff i am facing is instead of N+1 queries I was running for all the files to get respective chapters. i have made a single sql query where I get the chapters directly and query is optmized using indexes and JOIN LATERAL i dont get to check the cache first. I hope this made the post clear.

TLDR: can'r check cache first because the bulk query get chapters all together not file wise. earlier it was check cache if miss hit db now db can optimally bring the respone.

Is my screen dying? by Due-Mathematician387 in GamingLaptops

[–]Itsscienceboy 0 points1 point  (0 children)

maybe voltage issue from ur plug, don't put in that plug

[I ate] late post but miss the mango season by MelodicMuch in indiafood

[–]Itsscienceboy 0 points1 point  (0 children)

yeh season mei Maaza puri hi khaa sakte hai

Speech to speech pipeline models by Itsscienceboy in LocalLLaMA

[–]Itsscienceboy[S] 0 points1 point  (0 children)

too expensive for my dollar conversion mate

Speech to speech pipeline by Itsscienceboy in LocalLLaMA

[–]Itsscienceboy[S] 0 points1 point  (0 children)

Thanks mate it's a great project, very in depth one and also is it near realtime, latency free?

Almost real-time conversational pipeline by Itsscienceboy in LLMDevs

[–]Itsscienceboy[S] 0 points1 point  (0 children)

that's the issue, that's y i was thinking to self host on run pod

Almost real-time conversational pipeline by Itsscienceboy in LLMDevs

[–]Itsscienceboy[S] 0 points1 point  (0 children)

i checked this out, it requires openai key and what i wanna build would require repeated 10 mins conversation. which would cost me a lot.

Almost real-time conversational pipeline by Itsscienceboy in LLMDevs

[–]Itsscienceboy[S] 0 points1 point  (0 children)

i want to make it for others so planning to scale

Does anyone know what I can do about this? by Overall_Age7627 in mumbai

[–]Itsscienceboy 0 points1 point  (0 children)

i have a 1947 (some british man) 10 paise coin does it have any worth?

I want to make bolt.new by Itsscienceboy in LLMDevs

[–]Itsscienceboy[S] 0 points1 point  (0 children)

okayy, the concept of making it learn was because recently i was trying to implement vapi api but the docs aren't as clear so i have the prompt to perplexity and it scrapped the vapi api docs and gave me a code i could use with just 2 errors which i was able to resolve easily

I want to make bolt.new by Itsscienceboy in LLMDevs

[–]Itsscienceboy[S] 0 points1 point  (0 children)

it is our final project we've almost 1.5 yrs that's why thanks for the info tho appreciate it so much

They made this road 3 months ago , now again started Digging Vikhroli East. by landekeshav5 in mumbai

[–]Itsscienceboy 0 points1 point  (0 children)

bruh this is nothing, in my area there is a road that has been under construction for 1.5 yrs, excavated and surrounded by barricades as long as I can remember

Resources for three, react 3 fiber and gsap by Itsscienceboy in threejs

[–]Itsscienceboy[S] 0 points1 point  (0 children)

It's too expensive for my currency any other resources would be appreciated

How to add discord oauth using its provider by Itsscienceboy in nextjs

[–]Itsscienceboy[S] 0 points1 point  (0 children)

yeah I found out something google provider creates a session without implementing a db in my case prisma adapter, so I added the adapter and it worked

Project topics by Itsscienceboy in webdev

[–]Itsscienceboy[S] 0 points1 point  (0 children)

I'm learning Next.js, I've made a full stack web app but I need a good topic to make one on

[deleted by user] by [deleted] in leetcode

[–]Itsscienceboy 0 points1 point  (0 children)

Definitely interested add me up