8000 fix: correct method name for deleting cache by tags and clean up whit… by ZUHOWKS · Pull Request #216 · adonisjs/v6-docs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: correct method name for deleting cache by tags and clean up whit… #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ZUHOWKS
Copy link
Contributor
@ZUHOWKS ZUHOWKS commented May 28, 2025

Description

This PR makes two small documentation corrections :

  1. Fixes the example in the Cache section to correctly reference the deleteByTag method, which matches the actual BentoCache API implementation :
async deleteByTag(options: DeleteByTagOptions): Promise<boolean> {
  return this.use().deleteByTag(options)
}
  • In the Cache class implementation:
async deleteByTag(rawOptions: DeleteByTagOptions): Promise<boolean> {
  const tags = rawOptions.tags
  const options = this.#stack.defaultOptions.cloneWith(rawOptions)

  this.#options.logger.logMethod({ method: 'deleteByTag', cacheName: this.name, tags, options })

  return await this.#stack.createTagInvalidations(tags)
}
  1. Removes unnecessary trailing whitespace.

Changes

  • Corrected method name in code example of the documentation from deleteByTags to deleteByTag

Why

These changes ensure the documentation accurately reflects the BentoCache API, helping to prevent confusion for users who might use examples.

@Julien-R44
Copy link
Member

Thanks!

@Julien-R44 Julien-R44 merged commit fb77868 into adonisjs:main May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0