Skip to content

When the cache mode is equal to semantic, the cache will not take effect #1256

@seven-lv

Description

@seven-lv

What Happened?

Hi, I'm deploying the service using the source code directly.

While reviewing the caching logic, I attempted a global search for semantic but couldn’t find any actual implementation related to cache hits.

Also, according to the documentation, the max_age parameter is described as being in seconds, but I noticed in the source code:

new Date().getTime() + (requestOptions.cacheMaxAge || 24 * 60 * 60 * 1000)

This suggests that cacheMaxAge is actually treated as milliseconds. To avoid confusion, I’d like to confirm whether the documentation and implementation are consistent, or if a fix is needed either in the docs or the code.

Thanks!

What Should Have Happened?

No response

Relevant Code Snippet

No response

Your Twitter/LinkedIn

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions