Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrrobotdotapp/suppresscache
Generate randomly a string for clear cache from CloudFlare or other CDN. Using on Mr. Robøt.
https://github.com/mrrobotdotapp/suppresscache
discord hacktoberfest
Last synced: 2 months ago
JSON representation
Generate randomly a string for clear cache from CloudFlare or other CDN. Using on Mr. Robøt.
- Host: GitHub
- URL: https://github.com/mrrobotdotapp/suppresscache
- Owner: mrrobotdotapp
- License: mit
- Created: 2021-01-27T20:48:50.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-08T16:16:27.000Z (8 months ago)
- Last Synced: 2024-10-25T03:46:09.078Z (2 months ago)
- Topics: discord, hacktoberfest
- Language: JavaScript
- Homepage: https://mrrobot.app
- Size: 91.8 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Suppress Cache
Install it directly from the [NPM registry](https://www.npmjs.com/package/@mrrobotdotapp/suppresscache):
```bash
npm i @mrrobotdotapp/suppresscache
```This file is used on [the bot](https://mrrobot.app) for no cache files from CDNs.
Discord uses CloudFlare for caching management which can be problematic when you change an image and display it on the platform.
Even after a change on your side, Discord can still keep the old version in its cache.> **Note**
>
> Formerly called **NoCache**, it has been renamed because the package name on NPM already exists.## 💻 Code
```js
const { getFolderIcons } = require('@mrrobotdotapp/suppresscache');getFolderIcons(
"https://mrrobot.app/Folder/Of/Icons",
"myFileName.png",
true,
false
)
```Give that :
```bash
[suppressCache] Output : https://mrrobot.app/Folder/Of/Icons/file.png?suppressCache=gb0cqe0j
```You can test this code directly with [`./test/app.js`](./test/app.js).
### 🎈 Awesome links
Don't hesitate to follow me, you can also contribute to the development of all projects Open Source of Mr. Robøt by making a donation.
[![dependency - suppressCache](https://img.shields.io/badge/dependency-suppresscache-red?logo=npm&logoColor=white&style=for-the-badge)](https://www.npmjs.com/package/@mrrobotdotapp/suppresscache)
[![Twitter Follow](https://img.shields.io/badge/Follow%20me%20on-Twitter-1DA1F2?&logo=Twitter&style=for-the-badge)](https://twitter.com/Thomasbnt_) [![Discord](https://img.shields.io/discord/367753345575944221?style=for-the-badge&logo=discord&logoColor=white&labelColor=5865F2&color=%2357F287)](https://mrrobot.app/discord) [![GitHub Sponsors](https://img.shields.io/badge/Sponsor%20me-%23EA54AE.svg?&style=for-the-badge&logo=github-sponsors&logoColor=white)](https://github.com/sponsors/thomasbnt) [![Support me on Buy Me a Coffee](https://img.shields.io/badge/-Support%20me-%23FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/thomasbnt?via=thomasbnt)