Class CachedBooruSite

A proxy that wraps a BooruSite and transparently caches search and autocomplete results with node-cache, so repeated identical requests are served from memory instead of hitting the real site again.

Hierarchy (View Summary)

Constructors

Methods

  • Check if the Booru site supports random sorting of posts.

    Returns boolean

    True if the Booru site supports random sorting, false otherwise.

  • Clear this site's cached results. If a shared cache was passed in via options.cache, only keys belonging to this site are removed.

    Returns void

  • Get a list of file hosts used by the Booru site.

    Returns string[]

    An array of file host URLs.

  • Get the maximum number of tags that can be used in a search query for unauthenticated and authenticated users.

    Returns null | MaxTags

    An object containing the maximum number of tags for unauthenticated and authenticated users, or null if there is no limit.

  • Get the name of the Booru site.

    Returns string

    The name of the Booru site.

  • Get the slug of the Booru site.

    Returns string

    The unique slug of the Booru site.

  • Get the website URL of the Booru site.

    Returns string

    The website URL of the Booru site.