zaida04 / guilded.js

A library for creating bots with the guilded.gg bot API.
https://guilded.js.org
MIT License
69 stars 15 forks source link

feat: add Collection.maxSize to allow cache disabling #120

Closed Skillz4Killz closed 2 years ago

Skillz4Killz commented 2 years ago

Please describe the changes this PR makes and why it should be merged:

This PR adds a small bit of customization to the Collection class which will allow us to set a maxSize. This allows supporting cache disabling by simply setting the maxSize to 0, instead of heavy forking and customizing to disabling some parts of cache a bot does not need.

Status

Semantic versioning classification:

changeset-bot[bot] commented 2 years ago

⚠️ No Changeset found

Latest commit: a9d1e96b93d43599138c144b8a92158e7faf0954

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

zaida04 commented 2 years ago

This is already implemented here https://github.com/guildedjs/guilded.js/blob/main/packages/guilded.js/lib/cache.ts#L12