Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: new store type 'none' #15

Closed
anzolo opened this issue Sep 25, 2019 · 2 comments
Closed

feature request: new store type 'none' #15

anzolo opened this issue Sep 25, 2019 · 2 comments

Comments

@anzolo
Copy link

anzolo commented Sep 25, 2019

It will be good for local development. Developer can generate part of nuxt config like this:

cache: {
useHostPrefix: true,
pages: [
'/',
],
store: {
type: isDevelopment?'none':'memory',
max: 100,
ttl: 60,
},
},

as described in module that you used https://www.npmjs.com/package/cache-manager

Development environment
You may disable real caching but still get all the callback functionality working by setting none store.

@arash16
Copy link
Owner

arash16 commented Dec 7, 2019

Use something like this:

cache: !isDevelopment && {
    useHostPrefix: true,
    pages: [
    	'/',
    ],
    store: {
        type: 'memory',
        max: 100,
        ttl: 60,
    },
}

@arash16 arash16 closed this as completed Dec 7, 2019
@arash16
Copy link
Owner

arash16 commented Dec 7, 2019

Also you could conditionally return empty pages property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants