[{"data":1,"prerenderedAt":806},["ShallowReactive",2],{"navigation":3,"-drivers-vercel":137,"-drivers-vercel-surround":802},[4,26],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Getting Started","\u002Fguide","1.guide\u002F1.index",[9,11,16,21],{"title":5,"path":6,"stem":7,"icon":10},"ph:book-open-duotone",{"title":12,"path":13,"stem":14,"icon":15},"Utilities","\u002Fguide\u002Futils","1.guide\u002F2.utils","et:tools-2",{"title":17,"path":18,"stem":19,"icon":20},"HTTP Server","\u002Fguide\u002Fhttp-server","1.guide\u002F3.http-server","ic:baseline-http",{"title":22,"path":23,"stem":24,"icon":25},"Custom Driver","\u002Fguide\u002Fcustom-driver","1.guide\u002F4.custom-driver","carbon:area-custom",{"title":27,"path":28,"stem":29,"children":30,"icon":32},"Drivers","\u002Fdrivers","2.drivers\u002F0.index",[31,33,38,43,48,53,58,63,68,73,77,82,87,92,97,102,107,112,117,122,127,132],{"title":27,"path":28,"stem":29,"icon":32},"icon-park-outline:hard-disk",{"title":34,"path":35,"stem":36,"icon":37},"Azure","\u002Fdrivers\u002Fazure","2.drivers\u002Fazure","mdi:microsoft-azure",{"title":39,"path":40,"stem":41,"icon":42},"Browser","\u002Fdrivers\u002Fbrowser","2.drivers\u002Fbrowser","ph:browser-thin",{"title":44,"path":45,"stem":46,"icon":47},"Capacitor Preferences","\u002Fdrivers\u002Fcapacitor-preferences","2.drivers\u002Fcapacitor-preferences","nonicons:capacitor-16",{"title":49,"path":50,"stem":51,"icon":52},"Cloudflare","\u002Fdrivers\u002Fcloudflare","2.drivers\u002Fcloudflare","devicon-plain:cloudflareworkers",{"title":54,"path":55,"stem":56,"icon":57},"SQL Database","\u002Fdrivers\u002Fdatabase","2.drivers\u002Fdatabase","ph:database",{"title":59,"path":60,"stem":61,"icon":62},"Deno KV","\u002Fdrivers\u002Fdeno","2.drivers\u002Fdeno","simple-icons:deno",{"title":64,"path":65,"stem":66,"icon":67},"Filesystem (Node.js)","\u002Fdrivers\u002Ffs","2.drivers\u002Ffs","ph:file-light",{"title":69,"path":70,"stem":71,"icon":72},"GitHub","\u002Fdrivers\u002Fgithub","2.drivers\u002Fgithub","mdi:github",{"title":74,"path":75,"stem":76,"icon":20},"HTTP","\u002Fdrivers\u002Fhttp","2.drivers\u002Fhttp",{"title":78,"path":79,"stem":80,"icon":81},"LRU Cache","\u002Fdrivers\u002Flru-cache","2.drivers\u002Flru-cache","material-symbols:cached-rounded",{"title":83,"path":84,"stem":85,"icon":86},"Memory","\u002Fdrivers\u002Fmemory","2.drivers\u002Fmemory","bi:memory",{"title":88,"path":89,"stem":90,"icon":91},"MongoDB","\u002Fdrivers\u002Fmongodb","2.drivers\u002Fmongodb","teenyicons:mongodb-outline",{"title":93,"path":94,"stem":95,"icon":96},"Netlify Blobs","\u002Fdrivers\u002Fnetlify","2.drivers\u002Fnetlify","teenyicons:netlify-solid",{"title":98,"path":99,"stem":100,"icon":101},"Null","\u002Fdrivers\u002Fnull","2.drivers\u002Fnull","bi:trash3-fill",{"title":103,"path":104,"stem":105,"icon":106},"Overlay","\u002Fdrivers\u002Foverlay","2.drivers\u002Foverlay","carbon:overlay",{"title":108,"path":109,"stem":110,"icon":111},"PlanetScale","\u002Fdrivers\u002Fplanetscale","2.drivers\u002Fplanetscale","simple-icons:planetscale",{"title":113,"path":114,"stem":115,"icon":116},"Redis","\u002Fdrivers\u002Fredis","2.drivers\u002Fredis","simple-icons:redis",{"title":118,"path":119,"stem":120,"icon":121},"S3","\u002Fdrivers\u002Fs3","2.drivers\u002Fs3","simple-icons:amazons3",{"title":123,"path":124,"stem":125,"icon":126},"UploadThing","\u002Fdrivers\u002Fuploadthing","2.drivers\u002Fuploadthing","qlementine-icons:cloud-16",{"title":128,"path":129,"stem":130,"icon":131},"Upstash","\u002Fdrivers\u002Fupstash","2.drivers\u002Fupstash","simple-icons:upstash",{"title":133,"path":134,"stem":135,"icon":136},"Vercel","\u002Fdrivers\u002Fvercel","2.drivers\u002Fvercel","gg:vercel",{"id":138,"title":133,"body":139,"description":182,"extension":797,"meta":798,"navigation":799,"path":134,"seo":800,"stem":135,"__hash__":801},"content\u002F2.drivers\u002Fvercel.md",{"type":140,"value":141,"toc":785,"icon":136},"minimark",[142,147,154,161,166,176,295,305,308,312,334,338,356,361,428,433,460,464,490,507,511,516,522,525,531,544,546,551,554,647,651,654,738,741,781],[143,144,146],"h2",{"id":145},"vercel-runtime-cache","Vercel Runtime Cache",[148,149,150],"blockquote",{},[151,152,153],"p",{},"Cache data within Vercel Functions using the Runtime Cache API.",[155,156,158],"read-more",{"to":157},"https:\u002F\u002Fvercel.com\u002Fdocs\u002Ffunctions",[151,159,160],{},"Learn more about Vercel Functions and Runtime Cache.",[162,163,165],"h3",{"id":164},"usage","Usage",[151,167,168,172,173],{},[169,170,171],"strong",{},"Driver name:"," ",[174,175,145],"code",{},[177,178,183],"pre",{"className":179,"code":180,"language":181,"meta":182,"style":182},"language-js shiki shiki-themes github-light github-dark github-dark","import { createStorage } from \"unstorage\";\nimport vercelRuntimeCacheDriver from \"unstorage\u002Fdrivers\u002Fvercel-runtime-cache\";\n\nconst storage = createStorage({\n  driver: vercelRuntimeCacheDriver({\n    \u002F\u002F base: \"app\",\n    \u002F\u002F ttl: 60, \u002F\u002F seconds\n    \u002F\u002F tags: [\"v1\"],\n  }),\n});\n","js","",[174,184,185,208,223,230,250,261,268,277,283,289],{"__ignoreMap":182},[186,187,190,194,198,201,205],"span",{"class":188,"line":189},"line",1,[186,191,193],{"class":192},"so5gQ","import",[186,195,197],{"class":196},"slsVL"," { createStorage } ",[186,199,200],{"class":192},"from",[186,202,204],{"class":203},"sfrk1"," \"unstorage\"",[186,206,207],{"class":196},";\n",[186,209,211,213,216,218,221],{"class":188,"line":210},2,[186,212,193],{"class":192},[186,214,215],{"class":196}," vercelRuntimeCacheDriver ",[186,217,200],{"class":192},[186,219,220],{"class":203}," \"unstorage\u002Fdrivers\u002Fvercel-runtime-cache\"",[186,222,207],{"class":196},[186,224,226],{"class":188,"line":225},3,[186,227,229],{"emptyLinePlaceholder":228},true,"\n",[186,231,233,236,240,243,247],{"class":188,"line":232},4,[186,234,235],{"class":192},"const",[186,237,239],{"class":238},"suiK_"," storage",[186,241,242],{"class":192}," =",[186,244,246],{"class":245},"shcOC"," createStorage",[186,248,249],{"class":196},"({\n",[186,251,253,256,259],{"class":188,"line":252},5,[186,254,255],{"class":196},"  driver: ",[186,257,258],{"class":245},"vercelRuntimeCacheDriver",[186,260,249],{"class":196},[186,262,264],{"class":188,"line":263},6,[186,265,267],{"class":266},"sCsY4","    \u002F\u002F base: \"app\",\n",[186,269,271,274],{"class":188,"line":270},7,[186,272,273],{"class":266},"    \u002F\u002F ttl: 60,",[186,275,276],{"class":266}," \u002F\u002F seconds\n",[186,278,280],{"class":188,"line":279},8,[186,281,282],{"class":266},"    \u002F\u002F tags: [\"v1\"],\n",[186,284,286],{"class":188,"line":285},9,[186,287,288],{"class":196},"  }),\n",[186,290,292],{"class":188,"line":291},10,[186,293,294],{"class":196},"});\n",[151,296,297,300,301,304],{},[169,298,299],{},"Optional step:"," To allow using outside of vercel functions, install ",[174,302,303],{},"@vercel\u002Ffunctions"," in your project:",[306,307],"pm-install",{"name":303},[162,309,311],{"id":310},"options","Options",[313,314,315,322,328],"ul",{},[316,317,318,321],"li",{},[174,319,320],{},"base",": Optional prefix to use for all keys (namespacing).",[316,323,324,327],{},[174,325,326],{},"ttl",": Default TTL for all items in seconds.",[316,329,330,333],{},[174,331,332],{},"tags",": Default tags to apply to all cache entries (Note: Will be merged with per-call option tags).",[162,335,337],{"id":336},"per-call-options","Per-call options",[313,339,340,349],{},[316,341,342,344,345,348],{},[174,343,326],{},": Add TTL (in seconds) for this ",[174,346,347],{},"setItem"," call.",[316,350,351,353,354,348],{},[174,352,332],{},": Apply tags to this ",[174,355,347],{},[151,357,358],{},[169,359,360],{},"Example:",[177,362,364],{"className":179,"code":363,"language":181,"meta":182,"style":182},"await storage.setItem(\"user:123\", JSON.stringify({ name: \"Ana\" }), {\n  ttl: 3600,\n  tags: [\"user:123\"],\n});\n",[174,365,366,403,414,424],{"__ignoreMap":182},[186,367,368,371,374,376,379,382,385,388,391,394,397,400],{"class":188,"line":189},[186,369,370],{"class":192},"await",[186,372,373],{"class":196}," storage.",[186,375,347],{"class":245},[186,377,378],{"class":196},"(",[186,380,381],{"class":203},"\"user:123\"",[186,383,384],{"class":196},", ",[186,386,387],{"class":238},"JSON",[186,389,390],{"class":196},".",[186,392,393],{"class":245},"stringify",[186,395,396],{"class":196},"({ name: ",[186,398,399],{"class":203},"\"Ana\"",[186,401,402],{"class":196}," }), {\n",[186,404,405,408,411],{"class":188,"line":210},[186,406,407],{"class":196},"  ttl: ",[186,409,410],{"class":238},"3600",[186,412,413],{"class":196},",\n",[186,415,416,419,421],{"class":188,"line":225},[186,417,418],{"class":196},"  tags: [",[186,420,381],{"class":203},[186,422,423],{"class":196},"],\n",[186,425,426],{"class":188,"line":232},[186,427,294],{"class":196},[151,429,430],{},[169,431,432],{},"To expire by tags:",[177,434,436],{"className":179,"code":435,"language":181,"meta":182,"style":182},"await storage.clear(\"\", { tags: [\"user:123\"] });\n",[174,437,438],{"__ignoreMap":182},[186,439,440,442,444,447,449,452,455,457],{"class":188,"line":189},[186,441,370],{"class":192},[186,443,373],{"class":196},[186,445,446],{"class":245},"clear",[186,448,378],{"class":196},[186,450,451],{"class":203},"\"\"",[186,453,454],{"class":196},", { tags: [",[186,456,381],{"class":203},[186,458,459],{"class":196},"] });\n",[162,461,463],{"id":462},"limitations","Limitations",[313,465,466,475,480,487],{},[316,467,468,471,472,390],{},[174,469,470],{},"getKeys",": The runtime cache API does not support listing keys; this returns ",[174,473,474],{},"[]",[316,476,477,479],{},[174,478,446],{},": The runtime cache API does not support clearing by base; only tag-based expiration is supported.",[316,481,482,483,486],{},"Metadata: Runtime cache does not expose metadata; ",[174,484,485],{},"getMeta"," is not implemented.",[316,488,489],{},"Persistence: This is not a persistent store; it’s intended for request-time caching inside Vercel Functions.",[491,492,493],"note",{},[151,494,495,496,498,499,502,503,506],{},"\nThe Unstorage driver does not hash keys by default. To replicate the same behavior in ",[174,497,303],{}," when using ",[174,500,501],{},"getCache",", set the ",[174,504,505],{},"keyHashFunction: (key) => key"," option.",[143,508,510],{"id":509},"vercel-blob","Vercel Blob",[148,512,513],{},[151,514,515],{},"Store data in a Vercel Blob Store.",[155,517,519],{"to":518},"https:\u002F\u002Fvercel.com\u002Fdocs\u002Fstorage\u002Fvercel-blob",[151,520,521],{},"Learn more about Vercel Blob.",[162,523,165],{"id":524},"usage-1",[151,526,527,172,529],{},[169,528,171],{},[174,530,509],{},[151,532,533,534,543],{},"To use, you will need to install ",[535,536,540],"a",{"href":537,"rel":538},"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@vercel\u002Fblob",[539],"nofollow",[174,541,542],{},"@vercel\u002Fblob"," dependency in your project:",[306,545],{"name":542},[547,548,550],"h4",{"id":549},"public-access","Public access",[151,552,553],{},"Public blobs are accessible via their URL without authentication.",[177,555,557],{"className":179,"code":556,"language":181,"meta":182,"style":182},"import { createStorage } from \"unstorage\";\nimport vercelBlobDriver from \"unstorage\u002Fdrivers\u002Fvercel-blob\";\n\nconst storage = createStorage({\n  driver: vercelBlobDriver({\n    access: \"public\",\n    \u002F\u002F token: \"\u003Cyour secret token>\", \u002F\u002F or set BLOB_READ_WRITE_TOKEN\n    \u002F\u002F base: \"unstorage\",\n    \u002F\u002F envPrefix: \"BLOB\",\n  }),\n});\n",[174,558,559,571,585,589,601,610,620,628,633,638,642],{"__ignoreMap":182},[186,560,561,563,565,567,569],{"class":188,"line":189},[186,562,193],{"class":192},[186,564,197],{"class":196},[186,566,200],{"class":192},[186,568,204],{"class":203},[186,570,207],{"class":196},[186,572,573,575,578,580,583],{"class":188,"line":210},[186,574,193],{"class":192},[186,576,577],{"class":196}," vercelBlobDriver ",[186,579,200],{"class":192},[186,581,582],{"class":203}," \"unstorage\u002Fdrivers\u002Fvercel-blob\"",[186,584,207],{"class":196},[186,586,587],{"class":188,"line":225},[186,588,229],{"emptyLinePlaceholder":228},[186,590,591,593,595,597,599],{"class":188,"line":232},[186,592,235],{"class":192},[186,594,239],{"class":238},[186,596,242],{"class":192},[186,598,246],{"class":245},[186,600,249],{"class":196},[186,602,603,605,608],{"class":188,"line":252},[186,604,255],{"class":196},[186,606,607],{"class":245},"vercelBlobDriver",[186,609,249],{"class":196},[186,611,612,615,618],{"class":188,"line":263},[186,613,614],{"class":196},"    access: ",[186,616,617],{"class":203},"\"public\"",[186,619,413],{"class":196},[186,621,622,625],{"class":188,"line":270},[186,623,624],{"class":266},"    \u002F\u002F token: \"\u003Cyour secret token>\",",[186,626,627],{"class":266}," \u002F\u002F or set BLOB_READ_WRITE_TOKEN\n",[186,629,630],{"class":188,"line":279},[186,631,632],{"class":266},"    \u002F\u002F base: \"unstorage\",\n",[186,634,635],{"class":188,"line":285},[186,636,637],{"class":266},"    \u002F\u002F envPrefix: \"BLOB\",\n",[186,639,640],{"class":188,"line":291},[186,641,288],{"class":196},[186,643,645],{"class":188,"line":644},11,[186,646,294],{"class":196},[547,648,650],{"id":649},"private-access","Private access",[151,652,653],{},"Private blobs require authentication to access. You need to create a private blob store on the Vercel dashboard before using this mode.",[177,655,657],{"className":179,"code":656,"language":181,"meta":182,"style":182},"import { createStorage } from \"unstorage\";\nimport vercelBlobDriver from \"unstorage\u002Fdrivers\u002Fvercel-blob\";\n\nconst storage = createStorage({\n  driver: vercelBlobDriver({\n    access: \"private\",\n    \u002F\u002F token: \"\u003Cyour secret token>\", \u002F\u002F or set BLOB_READ_WRITE_TOKEN\n    \u002F\u002F base: \"unstorage\",\n    \u002F\u002F envPrefix: \"BLOB\",\n  }),\n});\n",[174,658,659,671,683,687,699,707,716,722,726,730,734],{"__ignoreMap":182},[186,660,661,663,665,667,669],{"class":188,"line":189},[186,662,193],{"class":192},[186,664,197],{"class":196},[186,666,200],{"class":192},[186,668,204],{"class":203},[186,670,207],{"class":196},[186,672,673,675,677,679,681],{"class":188,"line":210},[186,674,193],{"class":192},[186,676,577],{"class":196},[186,678,200],{"class":192},[186,680,582],{"class":203},[186,682,207],{"class":196},[186,684,685],{"class":188,"line":225},[186,686,229],{"emptyLinePlaceholder":228},[186,688,689,691,693,695,697],{"class":188,"line":232},[186,690,235],{"class":192},[186,692,239],{"class":238},[186,694,242],{"class":192},[186,696,246],{"class":245},[186,698,249],{"class":196},[186,700,701,703,705],{"class":188,"line":252},[186,702,255],{"class":196},[186,704,607],{"class":245},[186,706,249],{"class":196},[186,708,709,711,714],{"class":188,"line":263},[186,710,614],{"class":196},[186,712,713],{"class":203},"\"private\"",[186,715,413],{"class":196},[186,717,718,720],{"class":188,"line":270},[186,719,624],{"class":266},[186,721,627],{"class":266},[186,723,724],{"class":188,"line":279},[186,725,632],{"class":266},[186,727,728],{"class":188,"line":285},[186,729,637],{"class":266},[186,731,732],{"class":188,"line":291},[186,733,288],{"class":196},[186,735,736],{"class":188,"line":644},[186,737,294],{"class":196},[162,739,311],{"id":740},"options-1",[313,742,743,754,759,768],{},[316,744,745,748,749,751,752,390],{},[174,746,747],{},"access",": Whether the blob should be publicly or privately accessible. Must be ",[174,750,617],{}," or ",[174,753,713],{},[316,755,756,758],{},[174,757,320],{},": Prefix to prepend to all keys. Can be used for namespacing.",[316,760,761,764,765,390],{},[174,762,763],{},"token",": Rest API token to use for connecting to your Vercel Blob store. If not provided, it will be read from the environment variable ",[174,766,767],{},"BLOB_READ_WRITE_TOKEN",[316,769,770,773,774,777,778,780],{},[174,771,772],{},"envPrefix",": Prefix to use for token environment variable name. Default is ",[174,775,776],{},"BLOB"," (env name = ",[174,779,767],{},").",[782,783,784],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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 .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":182,"searchDepth":210,"depth":210,"links":786},[787,793],{"id":145,"depth":210,"text":146,"children":788},[789,790,791,792],{"id":164,"depth":225,"text":165},{"id":310,"depth":225,"text":311},{"id":336,"depth":225,"text":337},{"id":462,"depth":225,"text":463},{"id":509,"depth":210,"text":510,"children":794},[795,796],{"id":524,"depth":225,"text":165},{"id":740,"depth":225,"text":311},"md",{"icon":136},{"icon":136},{"title":133,"description":182},"KYfSSxhu3WE3aaqcTcSu2zmO3Rdcgw2qwUlEI4HJVAg",[803,805],{"title":128,"path":129,"stem":130,"description":804,"icon":131,"children":-1},"Store data in an Upstash Redis database.",null,1781217591841]