quick question about caching in djs

hi. is there any way to control what i cache specifically? for my example, here's a guild object:
{
"id": "197038439483310086",
"name": "Discord Testers",
"icon": "f64c482b807da4f539cff778d174971c",
"description": "The official place to report Discord Bugs!",
"splash": null,
"discovery_splash": null,
"features": [
"ANIMATED_ICON",
"VERIFIED",
"NEWS",
"VANITY_URL",
"DISCOVERABLE",
"MORE_EMOJI",
"INVITE_SPLASH",
"BANNER",
"COMMUNITY"
],
"emojis": [],
"banner": "9b6439a7de04f1d26af92f84ac9e1e4a",
"owner_id": "73193882359173120",
"application_id": null,
"region": null,
"afk_channel_id": null,
"afk_timeout": 300,
"system_channel_id": null,
"widget_enabled": true,
"widget_channel_id": null,
"verification_level": 3,
"roles": [],
"default_message_notifications": 1,
"mfa_level": 1,
"explicit_content_filter": 2,
"max_presences": 40000,
"max_members": 250000,
"vanity_url_code": "discord-testers",
"premium_tier": 3,
"premium_subscription_count": 33,
"system_channel_flags": 0,
"preferred_locale": "en-US",
"rules_channel_id": "441688182833020939",
"public_updates_channel_id": "281283303326089216",
"safety_alerts_channel_id": "281283303326089216"
}
{
"id": "197038439483310086",
"name": "Discord Testers",
"icon": "f64c482b807da4f539cff778d174971c",
"description": "The official place to report Discord Bugs!",
"splash": null,
"discovery_splash": null,
"features": [
"ANIMATED_ICON",
"VERIFIED",
"NEWS",
"VANITY_URL",
"DISCOVERABLE",
"MORE_EMOJI",
"INVITE_SPLASH",
"BANNER",
"COMMUNITY"
],
"emojis": [],
"banner": "9b6439a7de04f1d26af92f84ac9e1e4a",
"owner_id": "73193882359173120",
"application_id": null,
"region": null,
"afk_channel_id": null,
"afk_timeout": 300,
"system_channel_id": null,
"widget_enabled": true,
"widget_channel_id": null,
"verification_level": 3,
"roles": [],
"default_message_notifications": 1,
"mfa_level": 1,
"explicit_content_filter": 2,
"max_presences": 40000,
"max_members": 250000,
"vanity_url_code": "discord-testers",
"premium_tier": 3,
"premium_subscription_count": 33,
"system_channel_flags": 0,
"preferred_locale": "en-US",
"rules_channel_id": "441688182833020939",
"public_updates_channel_id": "281283303326089216",
"safety_alerts_channel_id": "281283303326089216"
}
i don't need over 90% of this. is there any way that i could make sure djs doesnt cache "default_message_notifications" for example?
6 Replies
d.js toolkit
d.js toolkit3d ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Noah;
Noah;OP3d ago
using latest version
monbrey
monbrey3d ago
Not at a per-property level, no
d.js docs
d.js docs3d ago
:guide: Miscellaneous: Cache customization read more
monbrey
monbrey3d ago
And for what it's worth, disabling specific properties would not save you much memory over limiting at the object level
Noah;
Noah;OP3d ago
alr sounds good that'd be a good addition anyways thanks. take care.

Did you find this page helpful?