DEV Community

Cover image for Suppress Cache
Thomas Bnt Subscriber for Mr. Robøt

Posted on • Edited on

2 1

Suppress Cache

New project Open Source on GitHub !

TLDR : Generate randomly a string for clear cache from Cloudflare or other CDN. Using on Mr. Robøt.

This file is used on the bot 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.

const { getFolderIcons } = require('suppresscache');

getFolderIcons(
  "https://mrrobot.app/Folder/Of/Icons",
  "myFileName.png",
  true,
  false
)
Enter fullscreen mode Exit fullscreen mode

Give that :

[suppressCache] Output : https://mrrobot.app/Folder/Of/Icons/file.png?suppressCache=gb0cqe0j
Enter fullscreen mode Exit fullscreen mode

GitHub logo mrrobotdotapp / SuppressCache

Generate randomly a string for clear cache from CloudFlare or other CDN. Using on Mr. Robøt.

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more