[{"data":1,"prerenderedAt":2244},["ShallowReactive",2],{"blog-post-/blogs/fetch-content-data-render-pages":3,"all-blogs-for-navigation":432},{"id":4,"title":5,"body":6,"description":422,"extension":140,"meta":423,"navigation":162,"ogImage":425,"path":428,"seo":429,"stem":430,"__hash__":431},"content/blogs/4. fetch-content-data-render-pages.md","How To Properly Fetch Nuxt Content Data and Render It in Nuxt Pages",{"type":7,"value":8,"toc":415},"minimark",[9,14,18,22,25,61,65,68,123,126,130,136,180,183,187,190,411],[10,11,13],"h3",{"id":12},"introduction","Introduction",[15,16,17],"p",{},"Nuxt.js is a popular open-source framework for building Vue.js applications. With the release of Nuxt 3, developers have access to new features and improvements to streamline the development process. One of these features is Nuxt Content v2, which allows you to create and manage content in a simple and efficient way. In this blog post, we will guide you through the steps to connect Nuxt Content v2 with Nuxt 3.",[10,19,21],{"id":20},"step-1-install-the-necessary-dependencies","Step 1: Install the necessary dependencies",[15,23,24],{},"The first step is to install the necessary dependencies for Nuxt Content v2. To do this, run the following command:",[26,27,32],"pre",{"className":28,"code":29,"language":30,"meta":31,"style":31},"language-js shiki shiki-themes dracula","npm install @nuxt/content@next\n\n","js","",[33,34,35],"code",{"__ignoreMap":31},[36,37,40,44,48,52,55,58],"span",{"class":38,"line":39},"line",1,[36,41,43],{"class":42},"sCdxs","npm install @",[36,45,47],{"class":46},"sY_PY","nuxt",[36,49,51],{"class":50},"s0Tla","/",[36,53,54],{"class":46},"content",[36,56,57],{"class":42},"@",[36,59,60],{"class":46},"next\n",[10,62,64],{"id":63},"step-2-configure-nuxt-content-v2","Step 2: Configure Nuxt Content v2",[15,66,67],{},"Once the dependencies are installed, you need to configure Nuxt Content v2 in your Nuxt 3 project. To do this, create a new file named nuxt.config.js in the root directory of your project and add the following code:",[26,69,71],{"className":28,"code":70,"language":30,"meta":31,"style":31},"export default {\n  // Enable Nuxt Content module\n  modules: [\n    '@nuxt/content'\n  ],\n\n",[33,72,73,84,91,103,117],{"__ignoreMap":31},[36,74,75,78,81],{"class":38,"line":39},[36,76,77],{"class":50},"export",[36,79,80],{"class":50}," default",[36,82,83],{"class":42}," {\n",[36,85,87],{"class":38,"line":86},2,[36,88,90],{"class":89},"shSDL","  // Enable Nuxt Content module\n",[36,92,94,97,100],{"class":38,"line":93},3,[36,95,96],{"class":42},"  modules",[36,98,99],{"class":50},":",[36,101,102],{"class":42}," [\n",[36,104,106,110,114],{"class":38,"line":105},4,[36,107,109],{"class":108},"seVfx","    '",[36,111,113],{"class":112},"s-mGx","@nuxt/content",[36,115,116],{"class":108},"'\n",[36,118,120],{"class":38,"line":119},5,[36,121,122],{"class":42},"  ],\n",[15,124,125],{},"In the above code, we have enabled the Nuxt Content module and set the directory where your content will be stored.",[10,127,129],{"id":128},"step-3-create-content-files","Step 3: Create content files",[15,131,132,133,135],{},"Once Nuxt Content v2 is configured, you can create content files in the specified directory. By default, Nuxt Content v2 supports Markdown and YAML file formats. You can create a new file in the ",[33,134,54],{}," directory with the following structure:",[26,137,141],{"className":138,"code":139,"language":140,"meta":31,"style":31},"language-md shiki shiki-themes dracula","---\ntitle: 'Hello, world!'\n---\n\n# Welcome to Nuxt Content v2\n\nThis is an example of a Markdown file created using Nuxt Content v2.\n","md",[33,142,143,148,153,158,164,169,174],{"__ignoreMap":31},[36,144,145],{"class":38,"line":39},[36,146,147],{"class":89},"---\n",[36,149,150],{"class":38,"line":86},[36,151,152],{"class":42},"title: 'Hello, world!'\n",[36,154,155],{"class":38,"line":93},[36,156,147],{"class":157},"sMMmS",[36,159,160],{"class":38,"line":105},[36,161,163],{"emptyLinePlaceholder":162},true,"\n",[36,165,166],{"class":38,"line":119},[36,167,168],{"class":157},"# Welcome to Nuxt Content v2\n",[36,170,172],{"class":38,"line":171},6,[36,173,163],{"emptyLinePlaceholder":162},[36,175,177],{"class":38,"line":176},7,[36,178,179],{"class":42},"This is an example of a Markdown file created using Nuxt Content v2.\n",[15,181,182],{},"In the above code, we have created a Markdown file with a title and a sample content.",[10,184,186],{"id":185},"step-4-display-content-on-a-page","Step 4: Display content on a page",[15,188,189],{},"Now that we have created content files, we can display the content on a page. To do this, create a new Vue component in the components directory with the following code:",[26,191,195],{"className":192,"code":193,"language":194,"meta":31,"style":31},"language-vue shiki shiki-themes dracula","\u003Cscript setup lang=\"ts\">\nconst { path } = useRoute()\nconst articles = await queryContent(path).findOne()\n\u003C/script>\n\n\u003Ctemplate>\n  \u003Cmain>\n    \u003Cdiv>\n      \u003CContentRenderer :value=\"articles\">\n        \u003Ctemplate #empty>\n          \u003Cp>No content found.\u003C/p>\n        \u003C/template>\n      \u003C/ContentRenderer>\n    \u003C/div>\n  \u003C/main>\n\u003C/template>\n","vue",[33,196,197,225,242,265,274,278,287,297,308,331,347,362,372,382,392,402],{"__ignoreMap":31},[36,198,199,202,205,208,211,214,217,220,222],{"class":38,"line":39},[36,200,201],{"class":42},"\u003C",[36,203,204],{"class":50},"script",[36,206,207],{"class":46}," setup",[36,209,210],{"class":46}," lang",[36,212,213],{"class":50},"=",[36,215,216],{"class":108},"\"",[36,218,219],{"class":112},"ts",[36,221,216],{"class":108},[36,223,224],{"class":42},">\n",[36,226,227,230,233,235,239],{"class":38,"line":86},[36,228,229],{"class":50},"const",[36,231,232],{"class":42}," { path } ",[36,234,213],{"class":50},[36,236,238],{"class":237},"sAOxA"," useRoute",[36,240,241],{"class":42},"()\n",[36,243,244,246,249,251,254,257,260,263],{"class":38,"line":93},[36,245,229],{"class":50},[36,247,248],{"class":42}," articles ",[36,250,213],{"class":50},[36,252,253],{"class":50}," await",[36,255,256],{"class":237}," queryContent",[36,258,259],{"class":42},"(path).",[36,261,262],{"class":237},"findOne",[36,264,241],{"class":42},[36,266,267,270,272],{"class":38,"line":105},[36,268,269],{"class":42},"\u003C/",[36,271,204],{"class":50},[36,273,224],{"class":42},[36,275,276],{"class":38,"line":119},[36,277,163],{"emptyLinePlaceholder":162},[36,279,280,282,285],{"class":38,"line":171},[36,281,201],{"class":42},[36,283,284],{"class":50},"template",[36,286,224],{"class":42},[36,288,289,292,295],{"class":38,"line":176},[36,290,291],{"class":42},"  \u003C",[36,293,294],{"class":50},"main",[36,296,224],{"class":42},[36,298,300,303,306],{"class":38,"line":299},8,[36,301,302],{"class":42},"    \u003C",[36,304,305],{"class":50},"div",[36,307,224],{"class":42},[36,309,311,314,317,320,322,324,327,329],{"class":38,"line":310},9,[36,312,313],{"class":42},"      \u003C",[36,315,316],{"class":50},"ContentRenderer",[36,318,319],{"class":46}," :value",[36,321,213],{"class":50},[36,323,216],{"class":108},[36,325,326],{"class":112},"articles",[36,328,216],{"class":108},[36,330,224],{"class":42},[36,332,334,337,339,342,345],{"class":38,"line":333},10,[36,335,336],{"class":42},"        \u003C",[36,338,284],{"class":50},[36,340,341],{"class":42}," #",[36,343,344],{"class":46},"empty",[36,346,224],{"class":42},[36,348,350,353,355,358,360],{"class":38,"line":349},11,[36,351,352],{"class":42},"          \u003C",[36,354,15],{"class":50},[36,356,357],{"class":42},">No content found.\u003C/",[36,359,15],{"class":50},[36,361,224],{"class":42},[36,363,365,368,370],{"class":38,"line":364},12,[36,366,367],{"class":42},"        \u003C/",[36,369,284],{"class":50},[36,371,224],{"class":42},[36,373,375,378,380],{"class":38,"line":374},13,[36,376,377],{"class":42},"      \u003C/",[36,379,316],{"class":50},[36,381,224],{"class":42},[36,383,385,388,390],{"class":38,"line":384},14,[36,386,387],{"class":42},"    \u003C/",[36,389,305],{"class":50},[36,391,224],{"class":42},[36,393,395,398,400],{"class":38,"line":394},15,[36,396,397],{"class":42},"  \u003C/",[36,399,294],{"class":50},[36,401,224],{"class":42},[36,403,405,407,409],{"class":38,"line":404},16,[36,406,269],{"class":42},[36,408,284],{"class":50},[36,410,224],{"class":42},[412,413,414],"style",{},"html pre.shiki code .sCdxs, html code.shiki .sCdxs{--shiki-default:#F8F8F2}html pre.shiki code .sY_PY, html code.shiki .sY_PY{--shiki-default:#50FA7B;--shiki-default-font-style:italic}html pre.shiki code .s0Tla, html code.shiki .s0Tla{--shiki-default:#FF79C6}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .shSDL, html code.shiki .shSDL{--shiki-default:#6272A4}html pre.shiki code .seVfx, html code.shiki .seVfx{--shiki-default:#E9F284}html pre.shiki code .s-mGx, html code.shiki .s-mGx{--shiki-default:#F1FA8C}html pre.shiki code .sMMmS, html code.shiki .sMMmS{--shiki-default:#BD93F9;--shiki-default-font-weight:bold}html pre.shiki code .sAOxA, html code.shiki .sAOxA{--shiki-default:#50FA7B}",{"title":31,"searchDepth":86,"depth":86,"links":416},[417,418,419,420,421],{"id":12,"depth":93,"text":13},{"id":20,"depth":93,"text":21},{"id":63,"depth":93,"text":64},{"id":128,"depth":93,"text":129},{"id":185,"depth":93,"text":186},"Here we will learn How To Properly Fetch Nuxt Content Data and Render It in Nuxt Pages",{"date":424,"image":425,"alt":5,"tags":426,"published":162},"1st Mar 2023","/blogs-img/blog4.jpg",[47,427],"nuxt-content","/blogs/fetch-content-data-render-pages",{"title":5,"description":422},"blogs/4. fetch-content-data-render-pages","FZUR4FWpcPh10Y5pZ-zDdemFmAyR9lYAEE-591z8f10",[433,511,701,763,1062,1191,1331,1760],{"id":434,"title":435,"body":436,"description":501,"extension":140,"meta":502,"navigation":162,"ogImage":503,"path":507,"seo":508,"stem":509,"__hash__":510},"content/blogs/1. connect-namecheap-to-vercel.md","How To Connect You Namecheap Domain With Vercel Deployed App",{"type":7,"value":437,"toc":493},[438,440,443,447,450,454,457,460,464,467,470,473,476,480,483,486,490],[10,439,13],{"id":12},[15,441,442],{},"If you've purchased a domain from Namecheap and you want to connect it to your Vercel app, there are a few steps you need to follow. In this blog, we'll guide you through the process of connecting your Namecheap domain with your Vercel app.",[10,444,446],{"id":445},"step-1-add-a-custom-domain-to-your-vercel-app","Step 1: Add a custom domain to your Vercel app",[15,448,449],{},"The first step is to add your custom domain to your Vercel app. To do this, log in to your Vercel account and go to your app dashboard. Click on \"Settings\" and then \"Domains\". Click on \"Add Domain\" and enter your custom domain name. Then click on \"Add\".",[10,451,453],{"id":452},"step-2-get-the-dns-records-from-vercel","Step 2: Get the DNS records from Vercel",[15,455,456],{},"Once you've added your custom domain to your Vercel app, you'll need to get the DNS records from Vercel. To do this, go back to the \"Domains\" section and click on the custom domain you just added. Then click on \"DNS Records\".",[15,458,459],{},"You'll see a list of DNS records that you need to add to your Namecheap account. These include the A record, the CNAME record, and the TXT record.",[10,461,463],{"id":462},"step-3-add-dns-records-to-namecheap","Step 3: Add DNS records to Namecheap",[15,465,466],{},"Now that you have the DNS records from Vercel, you need to add them to your Namecheap account. To do this, log in to your Namecheap account and go to your domain dashboard. Click on \"Advanced DNS\" and then \"Add New Record\".",[15,468,469],{},"Add the A record first. In the \"Type\" dropdown menu, select \"A (Address)\". In the \"Host\" field, enter \"@\" (without the quotes). In the \"Value\" field, enter the IP address from the Vercel DNS records.",[15,471,472],{},"Next, add the CNAME record. In the \"Type\" dropdown menu, select \"CNAME (Alias)\". In the \"Host\" field, enter \"www\" (without the quotes). In the \"Value\" field, enter the value from the Vercel DNS records.",[15,474,475],{},"Finally, add the TXT record. In the \"Type\" dropdown menu, select \"TXT (Text)\". In the \"Host\" field, enter \"@\" (without the quotes). In the \"Value\" field, enter the value from the Vercel DNS records.",[10,477,479],{"id":478},"step-4-verify-dns-records","Step 4: Verify DNS records",[15,481,482],{},"Once you've added the DNS records to your Namecheap account, you need to verify that they're correct. To do this, go back to your Vercel app dashboard and click on the custom domain. Then click on \"Verify DNS Configuration\". Vercel will check if the DNS records have been set up correctly.",[15,484,485],{},"It may take some time for the DNS records to propagate, so be patient. Once the DNS records have propagated, Vercel will verify them and your custom domain will be connected to your Vercel app.",[10,487,489],{"id":488},"conclusion","Conclusion",[15,491,492],{},"Connecting your Namecheap domain to your Vercel app is a relatively simple process. By following the steps outlined in this blog, you'll be able to connect your custom domain in no time. Remember to be patient as it may take some time for the DNS records to propagate. If you run into any issues, don't hesitate to reach out to Vercel support for assistance.",{"title":31,"searchDepth":86,"depth":86,"links":494},[495,496,497,498,499,500],{"id":12,"depth":93,"text":13},{"id":445,"depth":93,"text":446},{"id":452,"depth":93,"text":453},{"id":462,"depth":93,"text":463},{"id":478,"depth":93,"text":479},{"id":488,"depth":93,"text":489},"Here you will lean how to connect your namecheap domain to vercel deployed app.",{"date":424,"image":503,"alt":435,"tags":504,"published":162},"/blogs-img/blog1.jpg",[505,506],"namecheap","vercel","/blogs/connect-namecheap-to-vercel",{"title":435,"description":501},"blogs/1. connect-namecheap-to-vercel","6bP1Z3akUdkPDUNMFvzPGAroM_E6rx4Ix4BL2YTQTa4",{"id":512,"title":513,"body":514,"description":690,"extension":140,"meta":691,"navigation":162,"ogImage":693,"path":697,"seo":698,"stem":699,"__hash__":700},"content/blogs/2. fix-tailwindcss-intellisense-in-nuxt3.md","How To Fix TailwindCSS Intellisense In Nuxt3 Project",{"type":7,"value":515,"toc":685},[516,520,531,535,553,557,566,593,679,682],[10,517,519],{"id":518},"problems","Problems",[15,521,522,523,530],{},"I had a Nuxt3 and TailwindCSS project. which was opened in VsCode. But the problem was, in my project the tailwind intellisense didn't working properly. I tried to reinstall the vscode tailwind extension but the problem didn't solve properly. Later after doing some research I found a ",[524,525,529],"a",{"href":526,"rel":527},"https://github.com/tailwindlabs/tailwindcss-intellisense/issues/663#issuecomment-1316788128",[528],"nofollow","workaround",", That I am sharing here today.",[10,532,534],{"id":533},"why-its-not-working","Why It's Not working",[15,536,537,538,541,542,545,546,549,550,552],{},"In our nuxt project we have a ",[33,539,540],{},".nuxt"," directory. Nuxt uses the ",[33,543,544],{},".nuxt/"," directory in development to generate your Vue application. And if we try to look properly there is also a file called ",[33,547,548],{},".nuxt/tailwind.config.cjs",", So tailwind find to config file in the same project, one is in your root directory and another one is in you ",[33,551,540],{}," directory.",[10,554,556],{"id":555},"possible-workaround","Possible Workaround",[15,558,559,560,562,563,565],{},"One possible solution is, In your project we call tell the extension to exclude the ",[33,561,540],{}," directory. To exclude the ",[33,564,540],{}," directory in your workspace,",[567,568,569,577,588],"ul",{},[570,571,572,573,576],"li",{},"Create a ",[33,574,575],{},"/.vscode"," folder in your project's root level.",[570,578,579,580,583,584,587],{},"Inside ",[33,581,582],{},".vscode"," folder add a ",[33,585,586],{},"settings.json"," file",[570,589,590,591,587],{},"Copy the below code to ",[33,592,586],{},[26,594,598],{"className":595,"code":596,"language":597,"meta":31,"style":31},"language-json shiki shiki-themes dracula","// /.vscode/settings.json\n{\n  \"tailwindCSS.files.exclude\": [\"**/.git/**\", \"**/node_modules/**\", \"**/.hg/**\", \"**/.svn/**\", \"**/.nuxt/**\"]\n}\n","json",[33,599,600,605,610,674],{"__ignoreMap":31},[36,601,602],{"class":38,"line":39},[36,603,604],{"class":89},"// /.vscode/settings.json\n",[36,606,607],{"class":38,"line":86},[36,608,609],{"class":42},"{\n",[36,611,612,616,620,622,624,627,629,632,634,637,639,642,644,646,648,651,653,655,657,660,662,664,666,669,671],{"class":38,"line":93},[36,613,615],{"class":614},"sY8FZ","  \"",[36,617,619],{"class":618},"sLL85","tailwindCSS.files.exclude",[36,621,216],{"class":614},[36,623,99],{"class":50},[36,625,626],{"class":42}," [",[36,628,216],{"class":108},[36,630,631],{"class":112},"**/.git/**",[36,633,216],{"class":108},[36,635,636],{"class":42},", ",[36,638,216],{"class":108},[36,640,641],{"class":112},"**/node_modules/**",[36,643,216],{"class":108},[36,645,636],{"class":42},[36,647,216],{"class":108},[36,649,650],{"class":112},"**/.hg/**",[36,652,216],{"class":108},[36,654,636],{"class":42},[36,656,216],{"class":108},[36,658,659],{"class":112},"**/.svn/**",[36,661,216],{"class":108},[36,663,636],{"class":42},[36,665,216],{"class":108},[36,667,668],{"class":112},"**/.nuxt/**",[36,670,216],{"class":108},[36,672,673],{"class":42},"]\n",[36,675,676],{"class":38,"line":105},[36,677,678],{"class":42},"}\n",[15,680,681],{},"Hopefully now tailwind intellisense start working properly.",[412,683,684],{},"html pre.shiki code .shSDL, html code.shiki .shSDL{--shiki-default:#6272A4}html pre.shiki code .sCdxs, html code.shiki .sCdxs{--shiki-default:#F8F8F2}html pre.shiki code .sY8FZ, html code.shiki .sY8FZ{--shiki-default:#8BE9FE}html pre.shiki code .sLL85, html code.shiki .sLL85{--shiki-default:#8BE9FD}html pre.shiki code .s0Tla, html code.shiki .s0Tla{--shiki-default:#FF79C6}html pre.shiki code .seVfx, html code.shiki .seVfx{--shiki-default:#E9F284}html pre.shiki code .s-mGx, html code.shiki .s-mGx{--shiki-default:#F1FA8C}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":31,"searchDepth":86,"depth":86,"links":686},[687,688,689],{"id":518,"depth":93,"text":519},{"id":533,"depth":93,"text":534},{"id":555,"depth":93,"text":556},"In Nuxt3 project tailwind css intellisense doesn't seems to work properly. In this blog I will share a workaround to fix this issue.",{"date":692,"image":693,"alt":694,"tags":695,"published":162},"26th Jan 2023","/blogs-img/blog2.jpg","Hwo to fix tailwind intellisense in nuxt3 project",[47,696],"tailwindcss","/blogs/fix-tailwindcss-intellisense-in-nuxt3",{"title":513,"description":690},"blogs/2. fix-tailwindcss-intellisense-in-nuxt3","7ZGcJhWiVqLVOv2RrI7i56paOO-EQuvfqBkBlJrh6uE",{"id":702,"title":703,"body":704,"description":755,"extension":140,"meta":756,"navigation":162,"ogImage":757,"path":759,"seo":760,"stem":761,"__hash__":762},"content/blogs/3. create-namespace-subdomain-connect-to-vercel.md","How To Create Namespace Subdomain & Connect To Vercel App",{"type":7,"value":705,"toc":747},[706,708,711,715,718,721,725,728,732,735,739,742,744],[10,707,13],{"id":12},[15,709,710],{},"Creating a subdomain on Namecheap and connecting it with a Vercel deployed app is a straightforward process. In this blog, we will guide you through the steps required to create a subdomain on Namecheap and connect it to your Vercel deployed app.",[10,712,714],{"id":713},"step-1-create-a-subdomain-on-namecheap","Step 1: Create a subdomain on Namecheap",[15,716,717],{},"The first step is to create a subdomain on Namecheap. To do this, log in to your Namecheap account and go to your domain dashboard. Click on the \"Advanced DNS\" tab and then click on \"Add New Record\".",[15,719,720],{},"Select \"CNAME (Alias)\" from the \"Type\" dropdown menu. In the \"Host\" field, enter the name of your subdomain (for example, \"app\" if you want your subdomain to be \"app.yourdomain.com\"). In the \"Value\" field, enter the URL of your Vercel deployed app (for example, \"yourapp.vercel.app\").",[10,722,724],{"id":723},"step-2-verify-the-subdomain","Step 2: Verify the subdomain",[15,726,727],{},"After creating the subdomain, you need to verify that it has been set up correctly. To do this, go to your Vercel deployed app dashboard and click on the \"Domains\" tab. Click on \"Add Domain\" and enter the name of your subdomain. Vercel will verify the subdomain and confirm that it has been set up correctly.",[10,729,731],{"id":730},"step-3-add-the-subdomain-to-your-vercel-deployed-app","Step 3: Add the subdomain to your Vercel deployed app",[15,733,734],{},"Now that your subdomain has been verified, you need to add it to your Vercel deployed app. To do this, go to your app dashboard and click on \"Settings\". Click on \"Domains\" and then click on \"Add Domain\". Enter the name of your subdomain and click on \"Add\".",[10,736,738],{"id":737},"step-4-verify-the-subdomain-in-vercel","Step 4: Verify the subdomain in Vercel",[15,740,741],{},"After adding the subdomain to your Vercel deployed app, you need to verify that it has been set up correctly. To do this, click on the subdomain in your Vercel deployed app dashboard. Click on \"Verify DNS Configuration\". Vercel will check that the subdomain has been set up correctly and confirm that it is connected to your Vercel deployed app.",[10,743,489],{"id":488},[15,745,746],{},"Connecting a subdomain on Namecheap to your Vercel deployed app is a simple process that can be done in a few steps. By following the steps outlined in this blog, you can easily create a subdomain on Namecheap and connect it to your Vercel deployed app. Remember to verify your subdomain in both Namecheap and Vercel to ensure that it has been set up correctly. If you encounter any issues, reach out to Vercel support for assistance.",{"title":31,"searchDepth":86,"depth":86,"links":748},[749,750,751,752,753,754],{"id":12,"depth":93,"text":13},{"id":713,"depth":93,"text":714},{"id":723,"depth":93,"text":724},{"id":730,"depth":93,"text":731},{"id":737,"depth":93,"text":738},{"id":488,"depth":93,"text":489},"Here we will learn, How To Create Namespace Subdomain & Connect To Vercel App",{"date":424,"image":757,"alt":703,"tags":758,"published":162},"/blogs-img/blog3.jpg",[47,506,505],"/blogs/create-namespace-subdomain-connect-to-vercel",{"title":703,"description":755},"blogs/3. create-namespace-subdomain-connect-to-vercel","KlwXEABuKr1OOvtC55Cv8maXXicSrq8jiU1W1Mdh3dU",{"id":4,"title":5,"body":764,"description":422,"extension":140,"meta":1059,"navigation":162,"ogImage":425,"path":428,"seo":1061,"stem":430,"__hash__":431},{"type":7,"value":765,"toc":1052},[766,768,770,772,774,792,794,796,832,834,836,840,872,874,876,878,1050],[10,767,13],{"id":12},[15,769,17],{},[10,771,21],{"id":20},[15,773,24],{},[26,775,776],{"className":28,"code":29,"language":30,"meta":31,"style":31},[33,777,778],{"__ignoreMap":31},[36,779,780,782,784,786,788,790],{"class":38,"line":39},[36,781,43],{"class":42},[36,783,47],{"class":46},[36,785,51],{"class":50},[36,787,54],{"class":46},[36,789,57],{"class":42},[36,791,60],{"class":46},[10,793,64],{"id":63},[15,795,67],{},[26,797,798],{"className":28,"code":70,"language":30,"meta":31,"style":31},[33,799,800,808,812,820,828],{"__ignoreMap":31},[36,801,802,804,806],{"class":38,"line":39},[36,803,77],{"class":50},[36,805,80],{"class":50},[36,807,83],{"class":42},[36,809,810],{"class":38,"line":86},[36,811,90],{"class":89},[36,813,814,816,818],{"class":38,"line":93},[36,815,96],{"class":42},[36,817,99],{"class":50},[36,819,102],{"class":42},[36,821,822,824,826],{"class":38,"line":105},[36,823,109],{"class":108},[36,825,113],{"class":112},[36,827,116],{"class":108},[36,829,830],{"class":38,"line":119},[36,831,122],{"class":42},[15,833,125],{},[10,835,129],{"id":128},[15,837,132,838,135],{},[33,839,54],{},[26,841,842],{"className":138,"code":139,"language":140,"meta":31,"style":31},[33,843,844,848,852,856,860,864,868],{"__ignoreMap":31},[36,845,846],{"class":38,"line":39},[36,847,147],{"class":89},[36,849,850],{"class":38,"line":86},[36,851,152],{"class":42},[36,853,854],{"class":38,"line":93},[36,855,147],{"class":157},[36,857,858],{"class":38,"line":105},[36,859,163],{"emptyLinePlaceholder":162},[36,861,862],{"class":38,"line":119},[36,863,168],{"class":157},[36,865,866],{"class":38,"line":171},[36,867,163],{"emptyLinePlaceholder":162},[36,869,870],{"class":38,"line":176},[36,871,179],{"class":42},[15,873,182],{},[10,875,186],{"id":185},[15,877,189],{},[26,879,880],{"className":192,"code":193,"language":194,"meta":31,"style":31},[33,881,882,902,914,932,940,944,952,960,968,986,998,1010,1018,1026,1034,1042],{"__ignoreMap":31},[36,883,884,886,888,890,892,894,896,898,900],{"class":38,"line":39},[36,885,201],{"class":42},[36,887,204],{"class":50},[36,889,207],{"class":46},[36,891,210],{"class":46},[36,893,213],{"class":50},[36,895,216],{"class":108},[36,897,219],{"class":112},[36,899,216],{"class":108},[36,901,224],{"class":42},[36,903,904,906,908,910,912],{"class":38,"line":86},[36,905,229],{"class":50},[36,907,232],{"class":42},[36,909,213],{"class":50},[36,911,238],{"class":237},[36,913,241],{"class":42},[36,915,916,918,920,922,924,926,928,930],{"class":38,"line":93},[36,917,229],{"class":50},[36,919,248],{"class":42},[36,921,213],{"class":50},[36,923,253],{"class":50},[36,925,256],{"class":237},[36,927,259],{"class":42},[36,929,262],{"class":237},[36,931,241],{"class":42},[36,933,934,936,938],{"class":38,"line":105},[36,935,269],{"class":42},[36,937,204],{"class":50},[36,939,224],{"class":42},[36,941,942],{"class":38,"line":119},[36,943,163],{"emptyLinePlaceholder":162},[36,945,946,948,950],{"class":38,"line":171},[36,947,201],{"class":42},[36,949,284],{"class":50},[36,951,224],{"class":42},[36,953,954,956,958],{"class":38,"line":176},[36,955,291],{"class":42},[36,957,294],{"class":50},[36,959,224],{"class":42},[36,961,962,964,966],{"class":38,"line":299},[36,963,302],{"class":42},[36,965,305],{"class":50},[36,967,224],{"class":42},[36,969,970,972,974,976,978,980,982,984],{"class":38,"line":310},[36,971,313],{"class":42},[36,973,316],{"class":50},[36,975,319],{"class":46},[36,977,213],{"class":50},[36,979,216],{"class":108},[36,981,326],{"class":112},[36,983,216],{"class":108},[36,985,224],{"class":42},[36,987,988,990,992,994,996],{"class":38,"line":333},[36,989,336],{"class":42},[36,991,284],{"class":50},[36,993,341],{"class":42},[36,995,344],{"class":46},[36,997,224],{"class":42},[36,999,1000,1002,1004,1006,1008],{"class":38,"line":349},[36,1001,352],{"class":42},[36,1003,15],{"class":50},[36,1005,357],{"class":42},[36,1007,15],{"class":50},[36,1009,224],{"class":42},[36,1011,1012,1014,1016],{"class":38,"line":364},[36,1013,367],{"class":42},[36,1015,284],{"class":50},[36,1017,224],{"class":42},[36,1019,1020,1022,1024],{"class":38,"line":374},[36,1021,377],{"class":42},[36,1023,316],{"class":50},[36,1025,224],{"class":42},[36,1027,1028,1030,1032],{"class":38,"line":384},[36,1029,387],{"class":42},[36,1031,305],{"class":50},[36,1033,224],{"class":42},[36,1035,1036,1038,1040],{"class":38,"line":394},[36,1037,397],{"class":42},[36,1039,294],{"class":50},[36,1041,224],{"class":42},[36,1043,1044,1046,1048],{"class":38,"line":404},[36,1045,269],{"class":42},[36,1047,284],{"class":50},[36,1049,224],{"class":42},[412,1051,414],{},{"title":31,"searchDepth":86,"depth":86,"links":1053},[1054,1055,1056,1057,1058],{"id":12,"depth":93,"text":13},{"id":20,"depth":93,"text":21},{"id":63,"depth":93,"text":64},{"id":128,"depth":93,"text":129},{"id":185,"depth":93,"text":186},{"date":424,"image":425,"alt":5,"tags":1060,"published":162},[47,427],{"title":5,"description":422},{"id":1063,"title":1064,"body":1065,"description":1181,"extension":140,"meta":1182,"navigation":162,"ogImage":1184,"path":1187,"seo":1188,"stem":1189,"__hash__":1190},"content/blogs/5. vue3-awesome-library.md","Some Awesome Libraries For Vue3",{"type":7,"value":1066,"toc":1174},[1067,1069,1072,1076,1079,1112,1116,1119,1139,1143,1169,1171],[10,1068,13],{"id":12},[15,1070,1071],{},"Vue.js is a popular JavaScript framework for building web applications. It offers a lot of flexibility and ease of use, making it a go-to choice for many developers. One of the advantages of Vue.js is its rich library ecosystem. In this blog post, we will introduce you to some of the awesome libraries for Vue.js in different categories.",[10,1073,1075],{"id":1074},"essential","Essential",[15,1077,1078],{},"Some libraries are must have when you are start working with new project, here are my list",[567,1080,1081,1088,1094,1100,1106],{},[570,1082,1083,1087],{},[1084,1085,1086],"strong",{},"Vue Router",": Vue Router is the official router for Vue.js. It deeply integrates with Vue.js core to make building Single Page Applications with Vue.js a breeze",[570,1089,1090,1093],{},[1084,1091,1092],{},"Pinia",": Pinia started as an experiment to redesign what a Store for Vue could look like with the Composition API around November 2019.",[570,1095,1096,1099],{},[1084,1097,1098],{},"VueUse",": VueUse is a collection of utility functions based on Composition API. We assume you are already familiar with the basic ideas of Composition API before you continue.",[570,1101,1102,1105],{},[1084,1103,1104],{},"Vitest",": Vitest is a blazing fast unit test framework powered by Vite.",[570,1107,1108,1111],{},[1084,1109,1110],{},"Vue Macro",": Vue Macros is a library that implements proposals or ideas that have not been officially implemented by Vue. That means it will explore and extend more features and syntax sugar to Vue.",[10,1113,1115],{"id":1114},"ui-libraries","UI Libraries",[15,1117,1118],{},"UI libraries provide pre-built components and styles for building user interfaces. Here are some popular UI libraries for Vue.js:",[567,1120,1121,1127,1133],{},[570,1122,1123,1126],{},[1084,1124,1125],{},"Naive UI",": A Vue 3 Component Library Fairly Complete, Theme Customizable, Uses TypeScript, Fast Kinda Interesting",[570,1128,1129,1132],{},[1084,1130,1131],{},"Vuetify",": Vue Component Framework Vuetify is a no design skills required UI Library with beautifully handcrafted Vue Components.",[570,1134,1135,1138],{},[1084,1136,1137],{},"Vuestic",": You can create a new project or integrate Vuestic UI into an existing application. There are three ways to create new Vuestic App. All of them mostly the same and provides the same features.",[10,1140,1142],{"id":1141},"others","Others",[567,1144,1145,1151,1157,1163],{},[570,1146,1147,1150],{},[1084,1148,1149],{},"VueFire",": VueFire Official Firebase bindings for Vue.js",[570,1152,1153,1156],{},[1084,1154,1155],{},"Vue I118",": Vue I18n Internationalization plugin for Vue.js",[570,1158,1159,1162],{},[1084,1160,1161],{},"Vue Auto Animate",": Add motion to your apps with a single line of code.",[570,1164,1165,1168],{},[1084,1166,1167],{},"Vuelidate",": Vuelidate is considered model-based because the validation rules are defined next to your data, and the validation tree structure matches the data model structure.",[10,1170,489],{"id":488},[15,1172,1173],{},"In this blog post, we have introduced you to some of the awesome libraries for Vue.js in different categories. These libraries can help you build better and more engaging web applications with Vue.js. Remember to choose the right library based on your project requirements and always refer to the documentation for usage and integration instructions. If you encounter any issues, reach out to the Vue.js community for assistance.",{"title":31,"searchDepth":86,"depth":86,"links":1175},[1176,1177,1178,1179,1180],{"id":12,"depth":93,"text":13},{"id":1074,"depth":93,"text":1075},{"id":1114,"depth":93,"text":1115},{"id":1141,"depth":93,"text":1142},{"id":488,"depth":93,"text":489},"Vue.js is a popular JavaScript framework for building web applications. In this blog post, we will introduce you to some of the awesome libraries for Vue.js in different categories.",{"date":1183,"image":1184,"alt":1064,"tags":1185,"published":162},"1st Jan 2023","/blogs-img/blog5.jpg",[194,1186],"javascript","/blogs/vue3-awesome-library",{"title":1064,"description":1181},"blogs/5. vue3-awesome-library","I1rTbZJWAHUzepKnWecEoo8WqgR_czbzazQQWfNXnhM",{"id":1192,"title":1193,"body":1194,"description":1322,"extension":140,"meta":1323,"navigation":162,"ogImage":1325,"path":1327,"seo":1328,"stem":1329,"__hash__":1330},"content/blogs/6. how-to-fix-vuex-type-issue.md","How to fix vuex type issue",{"type":7,"value":1195,"toc":1318},[1196,1198,1201,1205,1217,1310,1315],[10,1197,13],{"id":12},[15,1199,1200],{},"In recent version of our vue project, when we try to add vuex we see type error and vuex type not found. We can easily fix that issue.",[10,1202,1204],{"id":1203},"how-to-fix-that-issue","How to fix that issue",[1206,1207,1208,1214],"ol",{},[570,1209,572,1210,1213],{},[33,1211,1212],{},"vuex.d.ts"," file inside of your route project.",[570,1215,1216],{},"Pase this code in that file",[26,1218,1221],{"className":1219,"code":1220,"language":219,"meta":31,"style":31},"language-ts shiki shiki-themes dracula","declare module 'vuex' {\n  export * from 'vuex/types/index.d.ts'\n  export * from 'vuex/types/helpers.d.ts'\n  export * from 'vuex/types/logger.d.ts'\n  export * from 'vuex/types/vue.d.ts'\n}\n",[33,1222,1223,1242,1261,1276,1291,1306],{"__ignoreMap":31},[36,1224,1225,1228,1231,1234,1237,1240],{"class":38,"line":39},[36,1226,1227],{"class":50},"declare",[36,1229,1230],{"class":50}," module",[36,1232,1233],{"class":108}," '",[36,1235,1236],{"class":112},"vuex",[36,1238,1239],{"class":108},"'",[36,1241,83],{"class":42},[36,1243,1244,1247,1251,1254,1256,1259],{"class":38,"line":86},[36,1245,1246],{"class":50},"  export",[36,1248,1250],{"class":1249},"sIQBb"," *",[36,1252,1253],{"class":50}," from",[36,1255,1233],{"class":108},[36,1257,1258],{"class":112},"vuex/types/index.d.ts",[36,1260,116],{"class":108},[36,1262,1263,1265,1267,1269,1271,1274],{"class":38,"line":93},[36,1264,1246],{"class":50},[36,1266,1250],{"class":1249},[36,1268,1253],{"class":50},[36,1270,1233],{"class":108},[36,1272,1273],{"class":112},"vuex/types/helpers.d.ts",[36,1275,116],{"class":108},[36,1277,1278,1280,1282,1284,1286,1289],{"class":38,"line":105},[36,1279,1246],{"class":50},[36,1281,1250],{"class":1249},[36,1283,1253],{"class":50},[36,1285,1233],{"class":108},[36,1287,1288],{"class":112},"vuex/types/logger.d.ts",[36,1290,116],{"class":108},[36,1292,1293,1295,1297,1299,1301,1304],{"class":38,"line":119},[36,1294,1246],{"class":50},[36,1296,1250],{"class":1249},[36,1298,1253],{"class":50},[36,1300,1233],{"class":108},[36,1302,1303],{"class":112},"vuex/types/vue.d.ts",[36,1305,116],{"class":108},[36,1307,1308],{"class":38,"line":171},[36,1309,678],{"class":42},[1206,1311,1312],{"start":93},[570,1313,1314],{},"That's it. Your are ok to go.",[412,1316,1317],{},"html pre.shiki code .s0Tla, html code.shiki .s0Tla{--shiki-default:#FF79C6}html pre.shiki code .seVfx, html code.shiki .seVfx{--shiki-default:#E9F284}html pre.shiki code .s-mGx, html code.shiki .s-mGx{--shiki-default:#F1FA8C}html pre.shiki code .sCdxs, html code.shiki .sCdxs{--shiki-default:#F8F8F2}html pre.shiki code .sIQBb, html code.shiki .sIQBb{--shiki-default:#BD93F9}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":31,"searchDepth":86,"depth":86,"links":1319},[1320,1321],{"id":12,"depth":93,"text":13},{"id":1203,"depth":93,"text":1204},"In recent vue project we see that vuex type not working properly. We will fix that type issue and make vuex type workable",{"date":1324,"image":1325,"alt":1193,"tags":1326,"published":162},"9th June 2024","/blogs-img/blog6.jpg",[194,1236],"/blogs/how-to-fix-vuex-type-issue",{"title":1193,"description":1322},"blogs/6. how-to-fix-vuex-type-issue","X0Ij6GDbKFFucQ9hZ41uxQ1S9n6IE8lVWZqUoj2o2nw",{"id":1332,"title":1333,"body":1334,"description":1749,"extension":140,"meta":1750,"navigation":162,"ogImage":1752,"path":1756,"seo":1757,"stem":1758,"__hash__":1759},"content/blogs/7. redis-ttl-jitter-and-how-i-almost-crashed-a-server.md","Redis TTL, Jitter, and How I Almost Crashed a Server 🚀",{"type":7,"value":1335,"toc":1740},[1336,1340,1345,1348,1352,1359,1375,1382,1386,1389,1395,1398,1442,1445,1448,1452,1463,1466,1471,1474,1482,1488,1492,1498,1509,1645,1659,1663,1666,1675,1678,1692,1699,1703,1706,1717,1723,1726,1737],[10,1337,1339],{"id":1338},"recently-i-ran-into-an-interesting-redis-case-that-taught-me-a-big-lesson","Recently, I ran into an interesting Redis case that taught me a big lesson:",[15,1341,1342],{},[1084,1343,1344],{},"Infinite cache TTLs are like hoarding—things pile up until it’s a problem.",[1346,1347],"hr",{},[10,1349,1351],{"id":1350},"the-setup-infinite-cache","The Setup: Infinite Cache",[15,1353,1354,1355,1358],{},"Once upon a time (okay, just a few months ago), we were saving some data in Redis with ",[1084,1356,1357],{},"no expiration",". The idea was simple:",[567,1360,1361,1369,1372],{},[570,1362,1363,1364,1368],{},"Data comes from another system (the ",[1365,1366,1367],"em",{},"real"," source of truth).",[570,1370,1371],{},"We cache it in Redis for fast access.",[570,1373,1374],{},"Done. Easy. ✅",[15,1376,1377,1378,1381],{},"But here’s the problem: when you never expire cache, it ",[1084,1379,1380],{},"keeps growing",". And growing. And growing. Like that drawer in your house where you throw every cable you’ve ever owned.",[10,1383,1385],{"id":1384},"the-task-add-a-ttl","The Task: Add a TTL",[15,1387,1388],{},"One day, I got the task:",[1390,1391,1392],"blockquote",{},[15,1393,1394],{},"“Please set a TTL of two weeks for this cache.”",[15,1396,1397],{},"Sounds easy, right? Just add:",[26,1399,1401],{"className":28,"code":1400,"language":30,"meta":31,"style":31},"redis.set('mykey', value, 'EX', 1209600) // 2 weeks in seconds\n",[33,1402,1403],{"__ignoreMap":31},[36,1404,1405,1408,1411,1414,1416,1419,1421,1424,1426,1429,1431,1433,1436,1439],{"class":38,"line":39},[36,1406,1407],{"class":42},"redis.",[36,1409,1410],{"class":237},"set",[36,1412,1413],{"class":42},"(",[36,1415,1239],{"class":108},[36,1417,1418],{"class":112},"mykey",[36,1420,1239],{"class":108},[36,1422,1423],{"class":42},", value, ",[36,1425,1239],{"class":108},[36,1427,1428],{"class":112},"EX",[36,1430,1239],{"class":108},[36,1432,636],{"class":42},[36,1434,1435],{"class":1249},"1209600",[36,1437,1438],{"class":42},") ",[36,1440,1441],{"class":89},"// 2 weeks in seconds\n",[15,1443,1444],{},"Boom. Done. Task finished. Go get coffee. ☕",[15,1446,1447],{},"Except… not really.",[10,1449,1451],{"id":1450},"the-problem-cache-avalanche","The Problem: Cache Avalanche",[15,1453,1454,1455,1458,1459,1462],{},"Think about what happens ",[1084,1456,1457],{},"two weeks later",".\nEvery single cached key expires ",[1084,1460,1461],{},"at the same time",".",[15,1464,1465],{},"Suddenly, Redis says:",[1390,1467,1468],{},[15,1469,1470],{},"“Sorry boss, no cache here!”",[15,1472,1473],{},"And then our poor backend server (the real source of truth) gets flooded with requests, like:",[26,1475,1480],{"className":1476,"code":1478,"language":1479},[1477],"language-text","HELP! SEND DATA! SEND DATA! SEND DATA!\n","text",[33,1481,1478],{"__ignoreMap":31},[15,1483,1484,1485,1462],{},"The server could literally crash under the unexpected load. This is called a ",[1084,1486,1487],{},"cache avalanche",[10,1489,1491],{"id":1490},"the-solution-add-jitter","The Solution: Add Jitter",[15,1493,1494,1495],{},"The trick is simple but powerful: ",[1084,1496,1497],{},"don’t let all keys expire at once.",[15,1499,1500,1501,1504,1505,1508],{},"Instead of setting ",[1084,1502,1503],{},"exactly 2 weeks",", we add a little randomness (aka ",[1365,1506,1507],{},"jitter","). For example:",[26,1510,1512],{"className":28,"code":1511,"language":30,"meta":31,"style":31},"// Expire between 14 and 16 days\nconst baseTTL = 14 * 24 * 60 * 60 // 14 days\nconst jitter = Math.floor(Math.random() * (2 * 24 * 60 * 60)) // up to 2 days\nconst ttl = baseTTL + jitter\n\nredis.set('mykey', value, 'EX', ttl)\n",[33,1513,1514,1519,1548,1599,1616,1620],{"__ignoreMap":31},[36,1515,1516],{"class":38,"line":39},[36,1517,1518],{"class":89},"// Expire between 14 and 16 days\n",[36,1520,1521,1523,1526,1528,1531,1533,1536,1538,1541,1543,1545],{"class":38,"line":86},[36,1522,229],{"class":50},[36,1524,1525],{"class":42}," baseTTL ",[36,1527,213],{"class":50},[36,1529,1530],{"class":1249}," 14",[36,1532,1250],{"class":50},[36,1534,1535],{"class":1249}," 24",[36,1537,1250],{"class":50},[36,1539,1540],{"class":1249}," 60",[36,1542,1250],{"class":50},[36,1544,1540],{"class":1249},[36,1546,1547],{"class":89}," // 14 days\n",[36,1549,1550,1552,1555,1557,1560,1563,1566,1569,1572,1575,1578,1581,1583,1585,1587,1589,1591,1593,1596],{"class":38,"line":93},[36,1551,229],{"class":50},[36,1553,1554],{"class":42}," jitter ",[36,1556,213],{"class":50},[36,1558,1559],{"class":42}," Math.",[36,1561,1562],{"class":237},"floor",[36,1564,1565],{"class":42},"(Math.",[36,1567,1568],{"class":237},"random",[36,1570,1571],{"class":42},"() ",[36,1573,1574],{"class":50},"*",[36,1576,1577],{"class":42}," (",[36,1579,1580],{"class":1249},"2",[36,1582,1250],{"class":50},[36,1584,1535],{"class":1249},[36,1586,1250],{"class":50},[36,1588,1540],{"class":1249},[36,1590,1250],{"class":50},[36,1592,1540],{"class":1249},[36,1594,1595],{"class":42},")) ",[36,1597,1598],{"class":89},"// up to 2 days\n",[36,1600,1601,1603,1606,1608,1610,1613],{"class":38,"line":105},[36,1602,229],{"class":50},[36,1604,1605],{"class":42}," ttl ",[36,1607,213],{"class":50},[36,1609,1525],{"class":42},[36,1611,1612],{"class":50},"+",[36,1614,1615],{"class":42}," jitter\n",[36,1617,1618],{"class":38,"line":119},[36,1619,163],{"emptyLinePlaceholder":162},[36,1621,1622,1624,1626,1628,1630,1632,1634,1636,1638,1640,1642],{"class":38,"line":171},[36,1623,1407],{"class":42},[36,1625,1410],{"class":237},[36,1627,1413],{"class":42},[36,1629,1239],{"class":108},[36,1631,1418],{"class":112},[36,1633,1239],{"class":108},[36,1635,1423],{"class":42},[36,1637,1239],{"class":108},[36,1639,1428],{"class":112},[36,1641,1239],{"class":108},[36,1643,1644],{"class":42},", ttl)\n",[15,1646,1647,1648,1651,1652,1651,1655,1658],{},"Now some keys expire in ",[1084,1649,1650],{},"14 days",", some in ",[1084,1653,1654],{},"15",[1084,1656,1657],{},"16",".\nWhich means requests trickle back to the server instead of hitting it like a tsunami. 🌊",[10,1660,1662],{"id":1661},"why-it-matters","Why It Matters",[15,1664,1665],{},"Without jitter:",[567,1667,1668],{},[570,1669,1670,1671,1674],{},"Day 14 → server gets ",[1084,1672,1673],{},"millions of requests at once",". Boom. 🔥",[15,1676,1677],{},"With jitter:",[567,1679,1680,1683,1686,1689],{},[570,1681,1682],{},"Day 14 → some requests",[570,1684,1685],{},"Day 15 → some more",[570,1687,1688],{},"Day 16 → a few more",[570,1690,1691],{},"Server is chill. 😎",[15,1693,1694,1695,1698],{},"This small change can ",[1084,1696,1697],{},"save your entire system"," from crashing.",[10,1700,1702],{"id":1701},"final-thoughts","Final Thoughts",[15,1704,1705],{},"Caching is powerful, but it comes with hidden gotchas.",[567,1707,1708,1711,1714],{},[570,1709,1710],{},"Infinite TTL? Your cache becomes a junkyard.",[570,1712,1713],{},"Fixed TTL? Your server might collapse in 14 days like a time bomb.",[570,1715,1716],{},"TTL with jitter? Balanced, safe, and production-ready.",[15,1718,1719,1720],{},"So the next time you set a cache TTL, remember:\n👉 ",[1365,1721,1722],{},"Always sprinkle some randomness in your Redis life.",[15,1724,1725],{},"Your future self (and your backend servers) will thank you. 🙏",[15,1727,1728,1729,1732,1733,1736],{},"Do you want me to also add a ",[1084,1730,1731],{},"diagram (ASCII or image idea)"," showing the difference between ",[1365,1734,1735],{},"no jitter vs jitter"," so it’s more visually clear for the blog?",[412,1738,1739],{},"html pre.shiki code .sCdxs, html code.shiki .sCdxs{--shiki-default:#F8F8F2}html pre.shiki code .sAOxA, html code.shiki .sAOxA{--shiki-default:#50FA7B}html pre.shiki code .seVfx, html code.shiki .seVfx{--shiki-default:#E9F284}html pre.shiki code .s-mGx, html code.shiki .s-mGx{--shiki-default:#F1FA8C}html pre.shiki code .sIQBb, html code.shiki .sIQBb{--shiki-default:#BD93F9}html pre.shiki code .shSDL, html code.shiki .shSDL{--shiki-default:#6272A4}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s0Tla, html code.shiki .s0Tla{--shiki-default:#FF79C6}",{"title":31,"searchDepth":86,"depth":86,"links":1741},[1742,1743,1744,1745,1746,1747,1748],{"id":1338,"depth":93,"text":1339},{"id":1350,"depth":93,"text":1351},{"id":1384,"depth":93,"text":1385},{"id":1450,"depth":93,"text":1451},{"id":1490,"depth":93,"text":1491},{"id":1661,"depth":93,"text":1662},{"id":1701,"depth":93,"text":1702},"Recently, I ran into an interesting Redis case that taught me a big lesson Infinite cache TTLs are like hoarding—things pile up until it’s a problem.",{"date":1751,"image":1752,"alt":1333,"tags":1753,"published":162},"18th Sep 2025","/blogs-img/blog7.png",[1754,1755,1507],"redis","ttl","/blogs/redis-ttl-jitter-and-how-i-almost-crashed-a-server",{"title":1333,"description":1749},"blogs/7. redis-ttl-jitter-and-how-i-almost-crashed-a-server","JbcEvgf3w-iEDJUcwtcUwf69SX0KVJFwDCBrjw7iIl4",{"id":1761,"title":1762,"body":1763,"description":2232,"extension":140,"meta":2233,"navigation":162,"ogImage":2235,"path":2240,"seo":2241,"stem":2242,"__hash__":2243},"content/blogs/8. float-make-my-dollar-float-away.md","FLOAT Made My Dollars Float Away - FLOAT vs DECIMAL in MySQL 💸",{"type":7,"value":1764,"toc":2221},[1765,1769,1783,1793,1800,1807,1811,1820,1827,1840,1843,1847,1892,1895,1930,1940,1944,1947,1960,1963,1991,1994,2009,2015,2022,2026,2032,2049,2090,2092,2116,2119,2123,2126,2135,2138,2150,2153,2157,2163,2167,2198,2202,2212,2218],[10,1766,1768],{"id":1767},"recently-i-got-a-task","Recently I got a task:",[1390,1770,1771],{},[15,1772,1773],{},[1084,1774,1775,1776,1779,1780],{},"Alter a table column from ",[33,1777,1778],{},"FLOAT"," to ",[33,1781,1782],{},"DECIMAL(10,2)",[15,1784,1785,1786],{},"I thought:\n",[1365,1787,1788,1789,1792],{},"\"Pff, easy task. Just run an ",[33,1790,1791],{},"ALTER TABLE"," and done. Why is this even a ticket?\"",[15,1794,1795,1796,1799],{},"But then I read the description.\nTurns out, ",[1084,1797,1798],{},"FLOAT was causing data loss",", and I needed to convert it without losing data.",[15,1801,1802,1803,1806],{},"That’s when I realized: this isn’t just about one query. It’s about how ",[1084,1804,1805],{},"FLOAT silently eats your money"," in MySQL.",[10,1808,1810],{"id":1809},"why-float-is-a-problem","Why FLOAT is a Problem",[15,1812,1813,1815,1816,1819],{},[33,1814,1778],{}," in MySQL is a ",[1084,1817,1818],{},"binary floating-point type",".\nIt doesn’t store exact values — only approximations.",[15,1821,1822,1823,1826],{},"That’s fine for rocket science 🚀 or graphics rendering 🎮, but for ",[1084,1824,1825],{},"money"," where every cent matters? Disaster.",[15,1828,1829,1830,1832,1833,1836,1837,1462],{},"Think of ",[33,1831,1778],{}," as a leaky bucket. You pour in ",[33,1834,1835],{},"$1,000,000.25","… and it gives you back ",[33,1838,1839],{},"$999,999.94",[15,1841,1842],{},"Not funny when it’s your salary.",[10,1844,1846],{"id":1845},"example-of-data-loss","Example of Data Loss",[26,1848,1852],{"className":1849,"code":1850,"language":1851,"meta":31,"style":31},"language-sql shiki shiki-themes dracula","CREATE TABLE money_float (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    amount FLOAT\n);\n\nINSERT INTO money_float (amount) VALUES (1000000.25), (123456789.99);\n\nSELECT * FROM money_float;\n","sql",[33,1853,1854,1859,1864,1869,1874,1878,1883,1887],{"__ignoreMap":31},[36,1855,1856],{"class":38,"line":39},[36,1857,1858],{},"CREATE TABLE money_float (\n",[36,1860,1861],{"class":38,"line":86},[36,1862,1863],{},"    id INT AUTO_INCREMENT PRIMARY KEY,\n",[36,1865,1866],{"class":38,"line":93},[36,1867,1868],{},"    amount FLOAT\n",[36,1870,1871],{"class":38,"line":105},[36,1872,1873],{},");\n",[36,1875,1876],{"class":38,"line":119},[36,1877,163],{"emptyLinePlaceholder":162},[36,1879,1880],{"class":38,"line":171},[36,1881,1882],{},"INSERT INTO money_float (amount) VALUES (1000000.25), (123456789.99);\n",[36,1884,1885],{"class":38,"line":176},[36,1886,163],{"emptyLinePlaceholder":162},[36,1888,1889],{"class":38,"line":299},[36,1890,1891],{},"SELECT * FROM money_float;\n",[15,1893,1894],{},"Result:",[1896,1897,1898,1911],"table",{},[1899,1900,1901],"thead",{},[1902,1903,1904,1908],"tr",{},[1905,1906,1907],"th",{},"id",[1905,1909,1910],{},"amount",[1912,1913,1914,1923],"tbody",{},[1902,1915,1916,1920],{},[1917,1918,1919],"td",{},"1",[1917,1921,1922],{},"1000000.25",[1902,1924,1925,1927],{},[1917,1926,1580],{},[1917,1928,1929],{},"123456792.00",[15,1931,1932,1933,1936,1937,1939],{},"We inserted ",[33,1934,1935],{},"123456789.99",", but got back ",[33,1938,1929],{},".\nThe bigger the number, the worse the corruption.",[10,1941,1943],{"id":1942},"but-why-does-float-lose-data","But Why Does FLOAT Lose Data?",[15,1945,1946],{},"Here’s the fun part. Let’s make it simple.",[567,1948,1949,1957],{},[570,1950,1951,1953,1954,1462],{},[33,1952,1778],{}," stores numbers in ",[1084,1955,1956],{},"binary (base 2)",[570,1958,1959],{},"But not every decimal number can be written exactly in binary.",[15,1961,1962],{},"Example:",[567,1964,1965,1972,1985],{},[570,1966,1967,1968,1971],{},"In decimal, ",[33,1969,1970],{},"0.1"," is simple.",[570,1973,1974,1975,1977,1978,1981,1982],{},"In binary, ",[33,1976,1970],{}," is ",[1084,1979,1980],{},"infinite repeating",": ",[33,1983,1984],{},"0.0001100110011…",[570,1986,1987,1988,1990],{},"So ",[33,1989,1778],{}," cuts it off at some point and stores an approximation.",[15,1992,1993],{},"That’s why when you do:",[26,1995,1997],{"className":1849,"code":1996,"language":1851,"meta":31,"style":31},"INSERT INTO money_float (amount) VALUES (0.1);\nSELECT amount FROM money_float;\n",[33,1998,1999,2004],{"__ignoreMap":31},[36,2000,2001],{"class":38,"line":39},[36,2002,2003],{},"INSERT INTO money_float (amount) VALUES (0.1);\n",[36,2005,2006],{"class":38,"line":86},[36,2007,2008],{},"SELECT amount FROM money_float;\n",[15,2010,2011,2012,1462],{},"You might see something like ",[33,2013,2014],{},"0.10000000149",[15,2016,2017,2018,2021],{},"Now imagine this tiny error repeated in ",[1084,2019,2020],{},"millions of dollars",".\nErrors pile up, and suddenly your 9-digit amount looks… off.",[10,2023,2025],{"id":2024},"decimal-to-the-rescue","DECIMAL to the Rescue",[15,2027,2028,2031],{},[33,2029,2030],{},"DECIMAL"," stores numbers differently:",[567,2033,2034,2041],{},[570,2035,2036,2037,2040],{},"Instead of binary approximation, it stores ",[1084,2038,2039],{},"exact digits as strings"," internally.",[570,2042,2043,2044,2046,2047,1462],{},"That means ",[33,2045,1935],{}," is stored as exactly ",[33,2048,1935],{},[26,2050,2052],{"className":1849,"code":2051,"language":1851,"meta":31,"style":31},"CREATE TABLE money_decimal (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    amount DECIMAL(15,2)\n);\n\nINSERT INTO money_decimal (amount) VALUES (1000000.25), (123456789.99);\n\nSELECT * FROM money_decimal;\n",[33,2053,2054,2059,2063,2068,2072,2076,2081,2085],{"__ignoreMap":31},[36,2055,2056],{"class":38,"line":39},[36,2057,2058],{},"CREATE TABLE money_decimal (\n",[36,2060,2061],{"class":38,"line":86},[36,2062,1863],{},[36,2064,2065],{"class":38,"line":93},[36,2066,2067],{},"    amount DECIMAL(15,2)\n",[36,2069,2070],{"class":38,"line":105},[36,2071,1873],{},[36,2073,2074],{"class":38,"line":119},[36,2075,163],{"emptyLinePlaceholder":162},[36,2077,2078],{"class":38,"line":171},[36,2079,2080],{},"INSERT INTO money_decimal (amount) VALUES (1000000.25), (123456789.99);\n",[36,2082,2083],{"class":38,"line":176},[36,2084,163],{"emptyLinePlaceholder":162},[36,2086,2087],{"class":38,"line":299},[36,2088,2089],{},"SELECT * FROM money_decimal;\n",[15,2091,1894],{},[1896,2093,2094,2102],{},[1899,2095,2096],{},[1902,2097,2098,2100],{},[1905,2099,1907],{},[1905,2101,1910],{},[1912,2103,2104,2110],{},[1902,2105,2106,2108],{},[1917,2107,1919],{},[1917,2109,1922],{},[1902,2111,2112,2114],{},[1917,2113,1580],{},[1917,2115,1935],{},[15,2117,2118],{},"Perfect. ✅ No rounding surprises.",[10,2120,2122],{"id":2121},"why-alter-wont-save-you","Why ALTER Won’t Save You",[15,2124,2125],{},"Here’s the trap I fell into:",[26,2127,2129],{"className":1849,"code":2128,"language":1851,"meta":31,"style":31},"ALTER TABLE money_float MODIFY amount DECIMAL(15,2);\n",[33,2130,2131],{"__ignoreMap":31},[36,2132,2133],{"class":38,"line":39},[36,2134,2128],{},[15,2136,2137],{},"You’d think this fixes it, right?\nNope. ❌",[15,2139,2140,2141,2143,2144,2147,2148,1462],{},"The data was already corrupted when it was first inserted as ",[33,2142,1778],{},".\n",[33,2145,2146],{},"ALTER"," just moves the already-broken value into ",[33,2149,2030],{},[15,2151,2152],{},"Garbage in → garbage out.",[10,2154,2156],{"id":2155},"visual-float-vs-decimal","Visual: FLOAT vs DECIMAL",[26,2158,2161],{"className":2159,"code":2160,"language":1479},[1477],"FLOAT (approximation in binary):\n123456789.99  --->  123456792.00 💀\n\nDECIMAL (exact digits):\n123456789.99  --->  123456789.99 ✅\n",[33,2162,2160],{"__ignoreMap":31},[10,2164,2166],{"id":2165},"lessons-learned","Lessons Learned",[567,2168,2169,2178,2189],{},[570,2170,2171,2172,51,2174,2177],{},"Never use ",[33,2173,1778],{},[33,2175,2176],{},"DOUBLE"," for money.",[570,2179,2180,2181,2184,2185,2188],{},"Always use ",[33,2182,2183],{},"DECIMAL(precision, scale)"," (e.g., ",[33,2186,2187],{},"DECIMAL(15,2)",").",[570,2190,2191,2192,2194,2195,2197],{},"If your table already has money in ",[33,2193,1778],{},", you cannot fix the lost precision with ",[33,2196,2146],{},". You’ll need to re-import or clean it at the source.",[10,2199,2201],{"id":2200},"final-thought","Final Thought",[15,2203,2204,2205,2207,2208,2211],{},"Using ",[33,2206,1778],{}," for money is like paying your salary in ",[1084,2209,2210],{},"Monopoly money",". 🎲💵\nIt looks okay until you try to spend it — then you realize it’s worthless.",[15,2213,2214,2215,2217],{},"Stick with ",[33,2216,2030],{},", and your dollars will stay safe. ✅",[412,2219,2220],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":31,"searchDepth":86,"depth":86,"links":2222},[2223,2224,2225,2226,2227,2228,2229,2230,2231],{"id":1767,"depth":93,"text":1768},{"id":1809,"depth":93,"text":1810},{"id":1845,"depth":93,"text":1846},{"id":1942,"depth":93,"text":1943},{"id":2024,"depth":93,"text":2025},{"id":2121,"depth":93,"text":2122},{"id":2155,"depth":93,"text":2156},{"id":2165,"depth":93,"text":2166},{"id":2200,"depth":93,"text":2201},"Recently I got a task Alter a table column from `FLOAT` to `DECIMAL(10,2)",{"date":2234,"image":2235,"alt":1762,"tags":2236,"published":162},"19th Sep 2025","/blogs-img/blog8.png",[2237,2238,2239],"mysql","float","decimal","/blogs/float-make-my-dollar-float-away",{"title":1762,"description":2232},"blogs/8. float-make-my-dollar-float-away","LLMtdDXEF2PNMbVJsdAFzOmMKY39dzRGJa9XONZHDaI",1770700754898]