# docpad-plugin-cachr

> Caches remote resources locally

Latest version **2.10.0** (published 2020-10-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install docpad-plugin-cachr
pnpm add docpad-plugin-cachr
yarn add docpad-plugin-cachr
bun add docpad-plugin-cachr
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.10.0 |
| Published | 2020-10-29 |
| First published | 2012-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 4 |
| Unpacked size | 22.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Bevry Pty Ltd |
| Maintainers | kizu, robloach, balupton, stormpooper, bevryme |
| Keywords | cache, caching, coffeescript, docpad, docpad-plugin, esnext, node, plugin |

## Links

- npm: https://www.npmjs.com/package/docpad-plugin-cachr
- Repository: https://github.com/docpad/docpad-plugin-cachr
- Issues: https://github.com/docpad/docpad-plugin-cachr/issues
- Funding: https://bevry.me/fund
- npm.io page: https://npm.io/package/docpad-plugin-cachr

## Dependencies (4)

- [feedr](https://npm.io/package/feedr.md) ^4.8.0
- [extendr](https://npm.io/package/extendr.md) ^5.16.0
- [taskgroup](https://npm.io/package/taskgroup.md) ^7.17.0
- [docpad-baseplugin](https://npm.io/package/docpad-baseplugin.md) ^1.4.0

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 2.10.0 (latest) — 2020-10-29
- 2.10.0-next.1603964865.9ad9eb529ad3724ea897b9b4a86ac09c1b1837fd (next) — 2020-10-29
- 2.9.0 — 2020-09-08
- 2.9.0-next.1599563647.5fb171a5be21fdec4009ce8ae73065eb7456fb82 — 2020-09-08
- 2.8.0 — 2020-09-07
- 2.8.0-next.1599458006.fdd7503a08bde46607d4342383803bd57c55fbd7 — 2020-09-07
- 2.7.0-next.1598865233.ad4bf4a5c998ccd1e5fffc4507188b9a0677181e — 2020-08-31
- 2.7.0-next.1598270710.d0518b97f0b41f561aa6af9f168c28a4cd6e2986 — 2020-08-24
- 2.7.0-next.1597698067.ba8bff56454d48346d09d816daac6a23867a495f — 2020-08-17
- 2.7.0-next.1596601576.47ad8c07de8363974a5f7c9f38797701fb60c942 — 2020-08-05
- 2.7.0-next.1596600457.1263952a0b5f181b4a1a64b4db3fbc4f8cafd62e — 2020-08-05
- 2.6.1 — 2018-07-19
- 2.6.0 — 2018-02-15
- 2.5.0 — 2017-03-31
- 2.4.0 — 2017-03-31
- … 17 more at https://npm.io/package/docpad-plugin-cachr/versions

## README

# Cachr Plugin for [DocPad](https://docpad.org)

<!-- BADGES/ -->

<span class="badge-travisci"><a href="http://travis-ci.com/docpad/docpad-plugin-cachr" title="Check this project's build status on TravisCI"><img src="https://img.shields.io/travis/com/docpad/docpad-plugin-cachr/master.svg" alt="Travis CI Build Status" /></a></span>
<span class="badge-npmversion"><a href="https://npmjs.org/package/docpad-plugin-cachr" title="View this project on NPM"><img src="https://img.shields.io/npm/v/docpad-plugin-cachr.svg" alt="NPM version" /></a></span>
<span class="badge-npmdownloads"><a href="https://npmjs.org/package/docpad-plugin-cachr" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/docpad-plugin-cachr.svg" alt="NPM downloads" /></a></span>
<span class="badge-daviddm"><a href="https://david-dm.org/docpad/docpad-plugin-cachr" title="View the status of this project's dependencies on DavidDM"><img src="https://img.shields.io/david/docpad/docpad-plugin-cachr.svg" alt="Dependency Status" /></a></span>
<span class="badge-daviddmdev"><a href="https://david-dm.org/docpad/docpad-plugin-cachr#info=devDependencies" title="View the status of this project's development dependencies on DavidDM"><img src="https://img.shields.io/david/dev/docpad/docpad-plugin-cachr.svg" alt="Dev Dependency Status" /></a></span>
<br class="badge-separator" />
<span class="badge-githubsponsors"><a href="https://github.com/sponsors/balupton" title="Donate to this project using GitHub Sponsors"><img src="https://img.shields.io/badge/github-donate-yellow.svg" alt="GitHub Sponsors donate button" /></a></span>
<span class="badge-patreon"><a href="https://patreon.com/bevry" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span>
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span>
<span class="badge-liberapay"><a href="https://liberapay.com/bevry" title="Donate to this project using Liberapay"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg" alt="Liberapay donate button" /></a></span>
<span class="badge-buymeacoffee"><a href="https://buymeacoffee.com/balupton" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a></span>
<span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span>
<span class="badge-crypto"><a href="https://bevry.me/crypto" title="Donate to this project using Cryptocurrency"><img src="https://img.shields.io/badge/crypto-donate-yellow.svg" alt="crypto donate button" /></a></span>
<span class="badge-paypal"><a href="https://bevry.me/paypal" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span>
<span class="badge-wishlist"><a href="https://bevry.me/wishlist" title="Buy an item on our wishlist for us"><img src="https://img.shields.io/badge/wishlist-donate-yellow.svg" alt="Wishlist browse button" /></a></span>

<!-- /BADGES -->


This [DocPad](https://docpad.org) plugin provides a template helper that will take in a remote URL, download it, and provide the local URL for you.





## Usage

To use, simply wrap any url you want to cache locally within the exposed `@cachr(url)` function inside your templates.

- [Eco](https://github.com/sstephenson/eco) example:

	``` coffeescript
	<img src="http://somewebsite.com/someimage.gif"/>
	```

	would become:

	``` coffeescript
	<img src="<%=@cachr('http://somewebsite.com/someimage.gif')%>"/>
	```

- [CoffeeKup](http://coffeekup.org/) example:

	``` coffeescript
	img src:'http://somewebsite.com/someimage.gif'
	```

	would become:

	``` coffeescript
	img src:@cachr('http://somewebsite.com/someimage.gif')
	```










<!-- INSTALL/ -->

<h2>Install</h2>

Install this DocPad plugin by entering <code>docpad install cachr</code> into your terminal.

<!-- /INSTALL -->


<!-- HISTORY/ -->

<h2>History</h2>

<a href="https://github.com/docpad/docpad-plugin-cachr/blob/master/HISTORY.md#files">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>

<!-- /HISTORY -->


<!-- CONTRIBUTE/ -->

<h2>Contribute</h2>

<a href="https://github.com/docpad/docpad-plugin-cachr/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>

<!-- /CONTRIBUTE -->


<!-- BACKERS/ -->

<h2>Backers</h2>

<h3>Maintainers</h3>

These amazing people are maintaining this project:

<ul><li><a href="https://github.com/balupton">Benjamin Lupton</a> — <a href="https://github.com/docpad/docpad-plugin-cachr/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository docpad/docpad-plugin-cachr">view contributions</a></li></ul>

<h3>Sponsors</h3>

No sponsors yet! Will you be the first?

<span class="badge-githubsponsors"><a href="https://github.com/sponsors/balupton" title="Donate to this project using GitHub Sponsors"><img src="https://img.shields.io/badge/github-donate-yellow.svg" alt="GitHub Sponsors donate button" /></a></span>
<span class="badge-patreon"><a href="https://patreon.com/bevry" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span>
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span>
<span class="badge-liberapay"><a href="https://liberapay.com/bevry" title="Donate to this project using Liberapay"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg" alt="Liberapay donate button" /></a></span>
<span class="badge-buymeacoffee"><a href="https://buymeacoffee.com/balupton" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a></span>
<span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span>
<span class="badge-crypto"><a href="https://bevry.me/crypto" title="Donate to this project using Cryptocurrency"><img src="https://img.shields.io/badge/crypto-donate-yellow.svg" alt="crypto donate button" /></a></span>
<span class="badge-paypal"><a href="https://bevry.me/paypal" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span>
<span class="badge-wishlist"><a href="https://bevry.me/wishlist" title="Buy an item on our wishlist for us"><img src="https://img.shields.io/badge/wishlist-donate-yellow.svg" alt="Wishlist browse button" /></a></span>

<h3>Contributors</h3>

These amazing people have contributed code to this project:

<ul><li><a href="https://github.com/balupton">Benjamin Lupton</a> — <a href="https://github.com/docpad/docpad-plugin-cachr/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository docpad/docpad-plugin-cachr">view contributions</a></li>
<li><a href="https://github.com/Zearin">Zearin</a> — <a href="https://github.com/docpad/docpad-plugin-cachr/commits?author=Zearin" title="View the GitHub contributions of Zearin on repository docpad/docpad-plugin-cachr">view contributions</a></li></ul>

<a href="https://github.com/docpad/docpad-plugin-cachr/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>

<!-- /BACKERS -->


<!-- LICENSE/ -->

<h2>License</h2>

Unless stated otherwise all works are:

<ul><li>Copyright &copy; <a href="http://bevry.me">Bevry Pty Ltd</a></li></ul>

and licensed under:

<ul><li><a href="http://spdx.org/licenses/MIT.html">MIT License</a></li></ul>

<!-- /LICENSE -->

---
_Source: https://npm.io/package/docpad-plugin-cachr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
