Skip to content

Potential cache miss issues with moize in jsHelper/cssHelper #5693

@D-Sketon

Description

@D-Sketon

Check List

  • I have already read Docs page & Troubleshooting page.
  • I have already searched existing issues and they are not help to me.
  • I examined error or warning messages and it's difficult to solve.
  • I am using the latest version of Hexo. (run hexo version to check)
  • My Node.js is matched the required version.

Expected behavior

moize should be able to consistently cache function calls with any parameters.

Actual behavior

Image moize consistently fails to cache for certain specific inputs.

How to reproduce?

For example, when calling <%- js({src: 'js/generator_search.js'}) %> in EJS, the function at

item.src = url_for.call(this, item.src);
modifies the input parameters of the moize function, such as changing it to {src: '/base/js/generator_search.js'}. This causes the deep comparison to fail every time.

Is the problem still there under Safe mode?

/

Your Node.js & npm version


Your Hexo and Plugin version


Your package.json

Your site's _config.yml (Optional)

Others

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions