Skip to content

[DOCS]: Custom cache implementation does not compile, isTag parameter not there #4905

@Ciantic

Description

@Ciantic

Enhancement hasn't been filed before.

  • I have verified this enhancement I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

First of all, it would be nice if some simple in-memory implementation was part of Drizzle, even AWS Lambda functions would benefit from those as they recycle lambdas. I think in-memory implementation would work for many cases.

But this problem is specifically about this part: https://orm.drizzle.team/docs/cache#custom-cache

Currently it has this signature for put:

  override async put(
    key: string,
    response: any,
    tables: string[],
    config?: CacheConfig,
  ): Promise<void> {
    // ...
  }

However someone has added since a isTag function parameter, right signature is:

  override async put(
    key: string,
    response: any,
    tables: string[],
    isTag: boolean,
    config?: CacheConfig,
  ): Promise<void> {
    // ...
  }

Then it satisfies the Cache interface.

However how to use the new isTag property? I don't know how to update this implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions