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: about 1 year 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 (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-08T16:16:27.000Z (about 2 years ago)
- Last Synced: 2025-04-20T01:33:22.041Z (about 1 year ago)
- Topics: discord, hacktoberfest
- Language: JavaScript
- Homepage: https://mrrobot.app
- Size: 91.8 KB
- Stars: 3
- Watchers: 1
- 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.
[](https://www.npmjs.com/package/@mrrobotdotapp/suppresscache)
[](https://twitter.com/Thomasbnt_) [](https://mrrobot.app/discord) [](https://github.com/sponsors/thomasbnt) [](https://www.buymeacoffee.com/thomasbnt?via=thomasbnt)