Skip to content

Typo in caching code sample #249

Open
@Oleg-Arkhipov

Description

@Oleg-Arkhipov

https://ssr.vuejs.org/guide/caching.html#page-level-caching

const LRU = require('lru-cache')

const renderer = createRenderer({
  cache: LRU({
    max: 10000,
    maxAge: ...
  })
})

According to the LRU docs, its export is a constructor, so the code should be:

const LRU = require('lru-cache')

const renderer = createRenderer({
  cache: new LRU({
    max: 10000,
    maxAge: ...
  })
})

Also if I still try the first variant, my SSR server just doesn't respond to requests.

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