{"_id":"netlify-plugin-cache","_rev":"4-9321d998214c3168e5f506cd9d4e8e61","name":"netlify-plugin-cache","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"netlify-plugin-cache","version":"1.0.0","description":"Generic cache plugin for saving and restoring files and/or folders between Netlify builds","author":{"name":"Jake Jarvis","email":"jake@jarv.is"},"license":"MIT","main":"index.js","homepage":"https://github.com/jakejarvis/netlify-plugin-cache#readme","bugs":{"url":"https://github.com/jakejarvis/netlify-plugin-cache/issues"},"repository":{"type":"git","url":"git+https://github.com/jakejarvis/netlify-plugin-cache.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["netlify","netlify-plugin","cache","ci","build","plugin"],"gitHead":"e2ee0ba0e3998debc52881e75f9a6ff45142da6f","_id":"netlify-plugin-cache@1.0.0","_nodeVersion":"14.0.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-rF2lcLH30OGsnFv4jSAt4iD4M0qfknv/3LjTb0OAigNylb4IAK9slrGAZhmK0Cn0AXftzh+4xCiOQ1TfpQb01w==","shasum":"f5612c3c46b81ea4a1906c86335d6760eea28048","tarball":"https://registry.npmjs.org/netlify-plugin-cache/-/netlify-plugin-cache-1.0.0.tgz","fileCount":5,"unpackedSize":6127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe26VnCRA9TVsSAnZWagAAS2wP/2IQfEmiaO4ZYhagRB7M\ngHHqNE5WurTiA5clJerpktH7aY7yfqP1Ld3VGYN7milljCWv1K9md7ZE0Frw\n3YMaVe7kvDKqdwSx+3sIEOfbXICTrHqfHFZ4E8D+d256EvLu7j5sz4T5Wcr+\nBpE/uviZqDMvqzn/Wmg4Vj0x0rlxzV4gRsDzj1QFby1r1PwaReL7nOSCzk01\nMyE9FqMo13fJa7F0QHr8ApMxV0hf61MLMY8m/PWuNwKJWWpabf0QfKiKga7U\nXanqeYpiJD2AaK/B7QN78mgpSslm0BA8zt0DaGdWs4YDMMcSpYIs3J35INjT\n5kdiPuee+ioo54T2zBo/KEhFkaLSG5vmiAuG4pUOgVwCCq/dAkZGSDBTMx4x\nTPIm4LwgmWcCk/7tfIujO826GriNJrgfPFAiRnbDh0eGFoosTqOIt8Rur8gZ\nE6mT9CQxfxRHebi1IYRyOxuPH4qg9qpXL1hLEnvBcogOZmutlLussWw4oKHc\nr1iAhiKCQQDfliFt04vnyxWDyZqa2Ew7H/GJu7UrKTx7zqB8AEnQOcxrYYu6\n9B4WySNoOoEz9frS4tgqqrjMSFAgVm3hoxGyDqasox5RNOPMKoK9HyQ2INVj\nTaq/yuAqxgIENHfSa4KX/hXTrBpbNHY5XOdxBhs+H4dn50C2/loTDC+y812B\ne/zy\r\n=xjI+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAZXsp2Ss4LtBu7p31B9nvZgC3/74bI30snfOZDPUFfFAiEA1IElZpjOMDF8On7O8F4NCOE6K/6t0tmpJMDXPDhjikg="}]},"maintainers":[{"name":"jakejarvis","email":"jake@jarv.is"}],"_npmUser":{"name":"jakejarvis","email":"jake@jarv.is"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/netlify-plugin-cache_1.0.0_1591453030919_0.8909746417355604"},"_hasShrinkwrap":false},"1.0.1":{"name":"netlify-plugin-cache","version":"1.0.1","description":"Generic cache plugin for saving and restoring files and/or folders between Netlify builds","author":{"name":"Jake Jarvis","email":"jake@jarv.is"},"license":"MIT","main":"index.js","homepage":"https://github.com/jakejarvis/netlify-plugin-cache#readme","bugs":{"url":"https://github.com/jakejarvis/netlify-plugin-cache/issues"},"repository":{"type":"git","url":"git+https://github.com/jakejarvis/netlify-plugin-cache.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["netlify","netlify-plugin","cache","ci","build","plugin"],"gitHead":"97c0823c185f5c6e6a7e3f43bdbaed2f9866e795","_id":"netlify-plugin-cache@1.0.1","_nodeVersion":"14.0.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-IAHI0K5lp/PP35UaOWjRRsFFWMiHphiTFlFGHj2Vt0r9a9qwxT54PxJqFCunxKtPxynQ3E7/Ybi2cwLd4lbb/g==","shasum":"65c7a722938d973b9c56202d2dcbbd3d187b8d2c","tarball":"https://registry.npmjs.org/netlify-plugin-cache/-/netlify-plugin-cache-1.0.1.tgz","fileCount":5,"unpackedSize":6687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe26/JCRA9TVsSAnZWagAAWWgQAIdOGJf7xTqjzFm7GUDd\nDpeOyfunyCE+HnNiadDT0SHBCSBgrNB+ZEgEvj0eJaWl7l0BYKDnLGK06Ri1\nN8r0S09ncHlliPSwvt3oXVvm2UIXFBgP17Oms6KaXoYbCEm9GobG4/q/bzNN\n7hdZzw4ikzlUqQikzUMWV/763i/vC/h5J8debEUe3Jx0/wI9BIQsXCSfOunv\nIuYk5xDYgJF6zB1a+HGivlIuC4JycKgOpE18PlVyksaPJf7+QpDQ242a89C4\nElRw8Wm3gavbuospJFPCQaEKGsjzFqPPR5E2IOvWdQ8IcLXNkYU6Y+K/ceRj\nVsqvKRprue791UE+82V0ww0di//4wLR4R/pftCQ0Ju83pIBIAUbpIIyGcXnW\nYnwv0w9HDi8gmHZnhCRRKRqDhYtd+/V8JdiJL6KYQx0QpDEjVufrie0eMY9Y\nN4XEufR20IluCnkasY9IgWmlgy+LjzG4Uo3sRlBDcVmLxQs0OsAKu/2oevi+\nRlX2/qjGPl+vRM6hQ0cCGALWPX9t6+0xOfiicHTHQn4pmUmWTOiC6YulVQhT\nKcfVb786RHLrXIE0Ivb92bGy1uptO3IyzF1bLYklsAFCjKVFXRekTxOT3ZIS\nLy/rUnyQm+ueIFEEG4tpmcOcttAazhVKucpIstoc2XKcYRdBjdgHviUVRmLC\n4Wc8\r\n=wT31\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHnQC1RUP/EJBdK+ajUnylSVQFwCo5sv0Ma7PP1AwwugIhAJ+Z4yQxXnwweRs4N2F9N2J0krvFakXAXgjxYGKUzDA4"}]},"maintainers":[{"name":"jakejarvis","email":"jake@jarv.is"}],"_npmUser":{"name":"jakejarvis","email":"jake@jarv.is"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/netlify-plugin-cache_1.0.1_1591455688827_0.1699544824703605"},"_hasShrinkwrap":false},"1.0.2":{"name":"netlify-plugin-cache","version":"1.0.2","description":"Generic cache plugin for saving and restoring files and/or folders between Netlify builds","author":{"name":"Jake Jarvis","email":"jake@jarv.is"},"license":"MIT","main":"index.js","homepage":"https://github.com/jakejarvis/netlify-plugin-cache#readme","bugs":{"url":"https://github.com/jakejarvis/netlify-plugin-cache/issues"},"repository":{"type":"git","url":"git+https://github.com/jakejarvis/netlify-plugin-cache.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["netlify","netlify-plugin","cache","ci","build","plugin"],"gitHead":"e580a58e5e24788e621bec4b05569ce7981ae72e","_id":"netlify-plugin-cache@1.0.2","_nodeVersion":"14.0.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-0abQlUdGX4cRtQiyP+6HLYlnxPZDe+dqckEOL6a4I4sTd2M0ZwOX6iPvxig6eHH26NDLPOXx7ugF6aQ5x8WXAg==","shasum":"7d0759af2228d7360c461377334f28b10adb7030","tarball":"https://registry.npmjs.org/netlify-plugin-cache/-/netlify-plugin-cache-1.0.2.tgz","fileCount":5,"unpackedSize":7051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2/mlCRA9TVsSAnZWagAAws8QAIgyLcrCtovPjT02+5xH\nY6QgK4Zb5LM+mphOfCKlioVCOjdeX/qg2lWwCkFlAHDFiJLgUnr0iWtHDwBH\nrzYnI9sRd95564XKNqQht/sTGqcTc5k23PIFp5u9YdTFlCRR6RP3Npalq15t\nhs5SKnL3NvXMQ94lDVTMGrwquuazJLlI20vr084q6QEA/ZmeXmkbJm/+jJLm\nL/OqnBrnuY0lbXf2ooH2i8AXufjo8xmuuG1mA8i5dnpQ1CLO0qfqQozwINwf\nw9FnnDUh7hNQW7UlK5JaWlSX2KKpm6gsuaMM+wIh0X5pkEORuvvj+uPxDeuQ\nTQfSawr9qg+vvWiCBLAdtM3c9BZ2uhl1yn3EONgx/uDGDuVuocKGH0gmyl/n\n3XIlU8PTFjqwdQ5pXfHF4FG3nl49admivD44H6GkGdSnxm4ByE5aiqhybGTa\nJX7LOExdt324ihRa0NAMnGjevzdzuHGYR87zZ51EV2tPAl4NUDu0ZKPvZg3Z\nTVnwKBIHHbI8/DL7TcddqbNQzbiHVy9eMpBbzYFxutzLyijytVz5txQvRpPE\nvO5/f3iSluUyaqJQvSCKNFCTIXrsLYiOoyvAR59APdpLwA4Dd3FFg9mzP78B\n6fHIxDw/7R3UXxzff2FvSQRo0VV8m+T2Q/XdF80OGykszIhCIc6IZJQiuwvc\ndS4Z\r\n=7rnB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVhgfuKrS/GSSzKDGwlgVRMGRVNXVk3/eJ0COuWt80IAiEA8z8XpAr/28LbNZG62RfcrlGV6m2u2X52WgdAK60DuT8="}]},"maintainers":[{"name":"jakejarvis","email":"jake@jarv.is"}],"_npmUser":{"name":"jakejarvis","email":"jake@jarv.is"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/netlify-plugin-cache_1.0.2_1591474597194_0.12558315058917735"},"_hasShrinkwrap":false},"1.0.3":{"name":"netlify-plugin-cache","version":"1.0.3","description":"Generic cache plugin for saving and restoring files and/or folders between Netlify builds","author":{"name":"Jake Jarvis","email":"jake@jarv.is"},"license":"MIT","main":"index.js","homepage":"https://github.com/jakejarvis/netlify-plugin-cache#readme","bugs":{"url":"https://github.com/jakejarvis/netlify-plugin-cache/issues"},"repository":{"type":"git","url":"git+https://github.com/jakejarvis/netlify-plugin-cache.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["netlify","netlify-plugin","cache","ci","build","plugin"],"gitHead":"a32494baca2b72963600aa6c8520fd48cd364ea8","_id":"netlify-plugin-cache@1.0.3","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-CTOwNWrTOP59T6y6unxQNnp1WX702v2R/faR5peSH94ebrYfyY4zT5IsRcIiHKq57jXeyCrhy0GLuTN8ktzuQg==","shasum":"f60514e259dff2b3286b6d60b570bb1c81206794","tarball":"https://registry.npmjs.org/netlify-plugin-cache/-/netlify-plugin-cache-1.0.3.tgz","fileCount":5,"unpackedSize":7050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6NFBCRA9TVsSAnZWagAASdQP/3vCFMtGyZ7suNfKJtY/\nMOqYjEu2Nwd5v+GSfuweIwp5xXTBkc/VYbLdkUsrYNb+aqGIyfgQU4Pzq7fq\nbhx2XEx6C8h77VQNhUUCeLw0fz/5gEFb0rT+ben4CzDifYooW8Mx+OvofEL1\nnI5lVMjUcr7KeKfEB9XaQJZJfSYrl/x5IcvLcDzpFiVFS7e/vx5yYT9RjhUq\nhmzfkJffMUvbBarc9FvVCfTTlJiY5ws5kh5vbt7DMAehiWV7PQzBh2GMt9Jm\nuwcEzEgRepbCWlU1RRYBHVQjHi5BkTAU6rR4kyS/8iOW2bjvjPBlGQ37NYoZ\nYqDcDnjwGVHVNFXAJs8UOtyNOtbAPGVWrB65sm2RXRu5+jVZbTFCZtzUKlOk\nmKt3NJwqVu/EiilcMU8/WYScxHiv/VyKRbYjTKD5J95ydGHA3ibqvK+LohaO\nJu8W/XHx5PWvne8nt4olkSvljXLSqZ/+mabzptb/4t012+GWMjtiUOC+kSyh\nci56g48R2ZaWC2Tp5z/Pa7z0VFDWvWvP6g8yDaDlbiInUAZdbbx98Au83SxC\nXrmhNOAmArtcwtPcfp1G7zNNXz+uav6CGvyU9R18gBpqruHi6lPFV2zFkrfn\noEl7NnTS43IXFL3ivbtQtt/gozM8hBYzz1WrFcEwqIJndhi5y3JAWZKaOgIi\noY/0\r\n=9Np9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3bmxtiHMzIqdzy0l6FYCiO9Lr0M0vT46MYsUYes9xxQIhAJ9N3IaLSMm/z+6JiIlUL58Dkz3nKwaODXyAwAQMPKd3"}]},"maintainers":[{"name":"jakejarvis","email":"jake@jarv.is"}],"_npmUser":{"name":"jakejarvis","email":"jake@jarv.is"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/netlify-plugin-cache_1.0.3_1592316225217_0.5125377664185564"},"_hasShrinkwrap":false}},"time":{"created":"2020-06-06T14:17:10.919Z","1.0.0":"2020-06-06T14:17:11.029Z","modified":"2022-05-10T13:16:21.680Z","1.0.1":"2020-06-06T15:01:28.942Z","1.0.2":"2020-06-06T20:16:37.283Z","1.0.3":"2020-06-16T14:03:45.365Z"},"maintainers":[{"name":"jakejarvis","email":"jake@jarv.is"}],"description":"Generic cache plugin for saving and restoring files and/or folders between Netlify builds","homepage":"https://github.com/jakejarvis/netlify-plugin-cache#readme","keywords":["netlify","netlify-plugin","cache","ci","build","plugin"],"repository":{"type":"git","url":"git+https://github.com/jakejarvis/netlify-plugin-cache.git"},"author":{"name":"Jake Jarvis","email":"jake@jarv.is"},"bugs":{"url":"https://github.com/jakejarvis/netlify-plugin-cache/issues"},"license":"MIT","readme":"# ⚡ Netlify Plugin: Custom Cache [![npm](https://img.shields.io/npm/v/netlify-plugin-cache?logo=npm&color=red)](https://www.npmjs.com/package/netlify-plugin-cache) ![CI](https://github.com/jakejarvis/netlify-plugin-cache/workflows/CI/badge.svg)\n\nA generic cache plugin for saving and restoring files and/or folders between Netlify builds for impressive speed improvements. Worry less about running out of build minutes! ⏰\n\nEssentially, this plugin is a pretty wrapper around [Netlify's native cache utility](https://github.com/netlify/build/blob/master/packages/cache-utils/README.md) — it isn't tied to any specific static site generator (on purpose).\n\n## 💿 Install\n\nAdd the following lines to your `netlify.toml`:\n\n```toml\n[[plugins]]\npackage = \"netlify-plugin-cache\"\n  [plugins.inputs]\n  # Optional (but highly recommended). Defaults to [\".cache\"].\n  paths = [\"resources\", \"_vendor\", \"folder/file.md\"]\n```\n\nThis plugin only takes one input named `paths`: an array of files and/or directories relative to your project's root. These files/directories are restored before a build and saved in cache after a build **if it is successful**.\n\n**🚨 Important:** `paths` defaults to `[\".cache\"]`, but it's **highly recommended** you set this yourself based on the tool(s) you're using to generate your site. See examples below.\n\nRead more about plugin configuration at [the official Netlify Plugin docs](https://docs.netlify.com/configure-builds/build-plugins/#install-a-plugin).\n\n## 👩‍💻 Usage\n\n- **Hugo:** Caching the `resources` directory can speed up your build greatly if you [process](https://gohugo.io/content-management/image-processing/) a lot of images, or compile SASS/SCSS via Hugo pipes. You can also cache the `public` directory to avoid completely rebuilding the entire site on each deploy. [More info here.](https://gohugo.io/getting-started/directory-structure/#directory-structure-explained)\n- **Gatsby:** By default, the `.cache` directory holds persistent data between builds. You can also cache the `dist` directory to avoid completely rebuilding the entire site on each deploy. [More info here.](https://www.gatsbyjs.org/docs/build-caching/)\n- **Jekyll:** A caching API was added as of v4. The notoriously slow SSG can become (relatively) faster by caching the `.jekyll-cache` directory. [More info here.](https://jekyllrb.com/tutorials/cache-api/)\n- **Next.js:** The `.next` directory holds the build output. [More info here.](https://nextjs.org/docs/api-reference/next.config.js/setting-a-custom-build-directory)\n- **Anything else:** This is the reason I kept this plugin as generic as possible! Research the caching behavior of your static site generator (and how to customize it if necessary). Feel free to open a PR and list it here as well!\n\n## 🐛 Debugging\n\nThis plugin doesn't provide a way to output a list of files that were cached or restored, because Netlify already provides an official plugin named [`netlify-plugin-debug-cache`](https://github.com/netlify-labs/netlify-plugin-debug-cache) to do exactly that. No need to re-invent the wheel!\n\nYou can add the debug plugin **after** this plugin in your `netlify.toml`. (And yes, you need a `[[plugins]]` line for _each_ plugin you add.)\n\n```toml\n[[plugins]]\npackage = \"netlify-plugin-debug-cache\"\n```\n\nThe debug plugin will generate a file named `cache-output.json` at the root of your project's publish directory. [See an example file](https://infallible-wing-581e78.netlify.app/cache-output.json) or [learn more about this plugin](https://github.com/netlify-labs/netlify-plugin-debug-cache).\n\n## 📜 License\n\nThis project is distributed under the [MIT license](LICENSE).\n","readmeFilename":"README.md"}