[{"data":1,"prerenderedAt":342},["ShallowReactive",2],{"navigation":3,"-drivers-overlay":137,"-drivers-overlay-surround":337},[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":103,"body":139,"description":181,"extension":332,"meta":333,"navigation":334,"path":104,"seo":335,"stem":105,"__hash__":336},"content\u002F2.drivers\u002Foverlay.md",{"type":140,"value":141,"toc":329,"icon":106},"minimark",[142,146,149,157,162,172,175,325],[143,144,145],"p",{},"This is a special driver that creates a multi-layer overlay driver.",[143,147,148],{},"All write operations happen on the top level layer while values are read from all layers.",[143,150,151,152,156],{},"When removing a key, a special value ",[153,154,155],"code",{},"__OVERLAY_REMOVED__"," will be set on the top level layer internally.",[158,159,161],"h2",{"id":160},"usage","Usage",[143,163,164,168,169],{},[165,166,167],"strong",{},"Driver name:"," ",[153,170,171],{},"overlay",[143,173,174],{},"In the example below, we create an in-memory overlay on top of fs. No changes will be actually written to the disk when setting new keys.",[176,177,182],"pre",{"className":178,"code":179,"language":180,"meta":181,"style":181},"language-js shiki shiki-themes github-light github-dark github-dark","import { createStorage } from \"unstorage\";\nimport overlay from \"unstorage\u002Fdrivers\u002Foverlay\";\nimport memory from \"unstorage\u002Fdrivers\u002Fmemory\";\nimport fs from \"unstorage\u002Fdrivers\u002Ffs\";\n\nconst storage = createStorage({\n  driver: overlay({\n    layers: [memory(), fs({ base: \".\u002Fdata\" })],\n  }),\n});\n","js","",[153,183,184,207,222,237,252,259,279,289,313,319],{"__ignoreMap":181},[185,186,189,193,197,200,204],"span",{"class":187,"line":188},"line",1,[185,190,192],{"class":191},"so5gQ","import",[185,194,196],{"class":195},"slsVL"," { createStorage } ",[185,198,199],{"class":191},"from",[185,201,203],{"class":202},"sfrk1"," \"unstorage\"",[185,205,206],{"class":195},";\n",[185,208,210,212,215,217,220],{"class":187,"line":209},2,[185,211,192],{"class":191},[185,213,214],{"class":195}," overlay ",[185,216,199],{"class":191},[185,218,219],{"class":202}," \"unstorage\u002Fdrivers\u002Foverlay\"",[185,221,206],{"class":195},[185,223,225,227,230,232,235],{"class":187,"line":224},3,[185,226,192],{"class":191},[185,228,229],{"class":195}," memory ",[185,231,199],{"class":191},[185,233,234],{"class":202}," \"unstorage\u002Fdrivers\u002Fmemory\"",[185,236,206],{"class":195},[185,238,240,242,245,247,250],{"class":187,"line":239},4,[185,241,192],{"class":191},[185,243,244],{"class":195}," fs ",[185,246,199],{"class":191},[185,248,249],{"class":202}," \"unstorage\u002Fdrivers\u002Ffs\"",[185,251,206],{"class":195},[185,253,255],{"class":187,"line":254},5,[185,256,258],{"emptyLinePlaceholder":257},true,"\n",[185,260,262,265,269,272,276],{"class":187,"line":261},6,[185,263,264],{"class":191},"const",[185,266,268],{"class":267},"suiK_"," storage",[185,270,271],{"class":191}," =",[185,273,275],{"class":274},"shcOC"," createStorage",[185,277,278],{"class":195},"({\n",[185,280,282,285,287],{"class":187,"line":281},7,[185,283,284],{"class":195},"  driver: ",[185,286,171],{"class":274},[185,288,278],{"class":195},[185,290,292,295,298,301,304,307,310],{"class":187,"line":291},8,[185,293,294],{"class":195},"    layers: [",[185,296,297],{"class":274},"memory",[185,299,300],{"class":195},"(), ",[185,302,303],{"class":274},"fs",[185,305,306],{"class":195},"({ base: ",[185,308,309],{"class":202},"\".\u002Fdata\"",[185,311,312],{"class":195}," })],\n",[185,314,316],{"class":187,"line":315},9,[185,317,318],{"class":195},"  }),\n",[185,320,322],{"class":187,"line":321},10,[185,323,324],{"class":195},"});\n",[326,327,328],"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 .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":181,"searchDepth":209,"depth":209,"links":330},[331],{"id":160,"depth":209,"text":161},"md",{"icon":106},{"icon":106},{"title":103,"description":181},"PRKv1VBa5xhEaTNNAbJkYKE5O6PsfXKYydUbT8g33XY",[338,340],{"title":98,"path":99,"stem":100,"description":339,"icon":101,"children":-1},"Discards all data.",{"title":108,"path":109,"stem":110,"description":341,"icon":111,"children":-1},"Store data in MySQL database via PlanetScale.",1781217588489]