Skip to content

Support useCache option. #2211

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

Closed
shareable-vision opened this issue Aug 2, 2023 · 3 comments
Closed

Support useCache option. #2211

shareable-vision opened this issue Aug 2, 2023 · 3 comments
Labels
enhancement New feature or request Stale

Comments

@shareable-vision
Copy link
Contributor

shareable-vision commented Aug 2, 2023

Is your feature request related to a problem? Please describe

Nuxt Content module v1 provided the useCache option to allow the prerendering/caching behavior to be disabled during production.

This is highly desirable, if you want to provide dynamic content in production without rebuilding the application.

Describe the solution you'd like

Provide the useCache option in the configuration to determine caching behavior:

const useCache = Boolean(!nuxt.options.dev && options.useCache)

Additional context

See discussion #2206

@shareable-vision shareable-vision added the enhancement New feature or request label Aug 2, 2023
@shareable-vision
Copy link
Contributor Author

If dynamic content were supported in production, perhaps the API should change, because useCache would be misleading, obviously implying that there's no caching at all.

The default behavior is to write the cache into the build directory with storage 'fs' driver (with 'cache:content' and 'cache:content:parsed' prefixes).

Alternatively the 'memory' driver could be used in development or production —simply decoupling from the filesystem.

Perhaps something like buildCache, optimizeCache, or staticCache would be more appropriate than useCache, or alternatively (to express the opposite) liveContent or dynamicContent.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Dec 10, 2024
Copy link

github-actions bot commented Jan 9, 2025

This issue was closed because it has been stalled for 30 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

1 participant